Jump to content

sjordi

Members
  • Content Count

    196
  • Joined

  • Last visited

Everything posted by sjordi

  1. sjordi

    Deploy without overwriting the DB?

    Wow, never ever encountered this! Thanks a thousands I'll investigate this a bit further more, but it looks like it does exactly what I need... Thanks a lot.
  2. sjordi

    ListView: click on checkmark only?

    Hi In a TListView, is there a way to know whether we clicked the checkmark (accessory in a dynamicappearance) ? The OnClickItem is fired when we click anywhere in the List Item. Under VCL there were a GetItemAt(X,Y) function to test whether we were on the check mark itself or not. It doesn't exist in FMX. I'd like to be able to put my own icon as a checkmark and turn it on / off only when clicking (or tapping with the finger) only in that checkmark area, not by clicking/tapping the full item itself. Any way to achieve such a thing? Thanks for any idea Steve
  3. sjordi

    ListView: click on checkmark only?

    Nope, didn't find the Arlésienne 🙂 It looks like the OnclickEx part works fine as it also allows to react to a click on the item (outside of the checkbox). I'm moving forward with this for now, but can definitely refactor later on. I had your blog article in my personal ressource wiki and didn't see it ... (no comments)
  4. sjordi

    ListView: click on checkmark only?

    Thanks Mr ListView specialist !!! Still in Arles here! It works fine actually, I didn't find any limit so far, but I'll check your blog. I'm always learning a lot from others, and especially from you... My app is fully MVVM and decoupled mostly from the GUI so trying other implementations rarely break anything. I checked your demos and found a lot of ListView customization, but didn't find one that check/unchecks when only the checkmark is clicked (unless you display it in edit mode but then it's not a custom checkmark)
  5. sjordi

    ListView: click on checkmark only?

    It looks like you can get the ClickEX event and get the coordinates of the click. Then check wether your clicked within your checkmark area and then respond accordingly. Something like this, say my glyph working as a checkmark is 44x44 and positioned at 0,0 and called "CheckIcon" procedure TForm.myListViewItemClickEx(const Sender: TObject; ItemIndex: Integer; const LocalClickPos: TPointF; const ItemObject: TListItemDrawable); if (LocalClickPos.X >0) AND (LocalClickPos.X < 44) And (LocalClickPos.Y >0) AND (LocalClickPos.Y < 44) then if myListViewItem.Items[ItemIndex].Data['CheckIcon'].AsInteger = 0 then myListViewItemItems[ItemIndex].Data['CheckIcon'] := 0 // First image in the ImageList else myListViewItem.Items[ItemIndex].Data['CheckIcon'] := 1 ; // 2nd image in the ImageList Now this seems to work on Windows, Mac, iOS, Android and Linux. Obviously that's one way to proceed. No problems with screen density differences. But if someone has a better practice, it would be great to post it here for everyone. Steve
  6. Hi everyone, Did anyone try to programmatically close the delete button when swiping on a TListView item? The only way it to click on it or on the List Item. I'd like to take an action and immediately close/hide it when the user lifts the finger... (just like swipe to immediately execute an action and release) Any idea? Thanks for any help Steve
  7. sjordi

    VertScrollBox real size?

    Hi, I'm losing my nerves on something I thought would be simple. I have TVertScrollBox aligning "client" to the main form in which I place other controls at creation time. Some of those controls are out of screen, much down there in the VertScrollBox. Now my problem is that I need to know what is the full size of the VertScrollBox containing all the controls. By full size I mean even the non-visible part that can be revealed once one scrolls down. I think I tried everything and always get the height of the visible part of VertScrollBox. I tried its ViewPort, its Boundaries, Content.Height, Content.Boundaries, etc... each time the same result: the actual visible form size. After looking around, someone facing the same problem suggested to calculate it myself while adding the controls, taking the further down one, get its vertical Y position, add its height and then I know what the height (bottom) of the VertScrollBox. It works. But I may be a purist, it looks to me to be just tinkering around like a fool. How come there is no way to get the VertScollBox FULL size at each moment ? Or is it so obvious right under my nose that I don't see it? Thanks for any light. Steve
  8. sjordi

    VertScrollBox real size?

    Damn ! Of course I found the answer right after posting. For those facing the same problem... VertScrollbox.ContentBounds.Height // no comment
  9. Hi, I would like to know whether it's possible to send a file to a specific app on iOS. First thing coming to mind is to use ShareSheet, but is there a way to bypass the form and do everything programmatically? An example, would be to have the Nextcloud app on the smartphone and on my Delphi app, create some zip files with some data inside the archives. Once a zip file is ready, I'd like to send it to the Nextcloud app (which is already identified via credentials) so it can push it on its server. All this without displaying the ShareSheet ... Any idea? Nextcloud is for self hosted file servers, my question would be the same f it would be targeting GoogleDrive, OneDrive, DropBox, etc... Thanks for any help Steve
  10. sjordi

    Cannot build for linux on Windows 11

    if you are in a VM and you share the Documents folder from the host, it's seen as a remote folder (network) and it doesn't work. As you say, either you can copy the entire Linux SDKs into your local disk and make the IDE point on them or you can use aliases. I have 3 SDKs: CentOS7, Rocky8, Ubuntu20.04. Copying everything into the VM would gobble a lot of valuable disk space. Instead I keep my SDKs on my Mac Documents folder. The VM sees the Document sfolder mounted as Y: (so adapt to your situation in the example below). Here is what I did in the Windows VM mklink /d "c:\Documents\SDKs\Ubuntu20" "y:\Documents\Embarcadero\Studio\SDKs\ubuntu20.04.sdk" That way, in your Windows Documents folder, you'll have a link to the outside (host) real SDK and they won't appear as remote network mounts, and thus work correctly. In RadStudio IDE, make sure to set the Linux platform "Local root directory" to C:\Documents\SDKs\ubuntu20 Same for CentOS, Rocky, and other flavors... Hope this helps.
  11. sjordi

    Image ios

    Shouldn't you first crop the picture to the exact display position and then save it? Then you will lose everything outside of the view if that's what you intend to do? Isn't there a function like ClipRect or so.
  12. sjordi

    Scrollable TGridLayout question

    Hi all, After three days googling and reading about the same question... it looks like I didn't find a valid answer. I have to display glyphs in a TGridLayout, because I create those glyphs dynamically. Each of them represent either a folder icon or a file icon. I can click on them and respond the way I want. Problem is that I need my GridLayout to scroll vertically when I reach more rows than displayed on screen. For this I resize the layout taller than the form's height. On desktops, it's fine, I can click all my glyphs and the scrollbar appears to scroll up and down when I have more rows than the form's height (macOS, windows, Linux) Now on mobile devices it's another story. I think it has to do with HitTest that captures the click/tap on the glyph. So when I want to scroll the layout, nothing happens. If I turn HitTest to false for each glyph, then I can correctly scroll but I can't click the glyph anymore. The only way to still be able to click and to scroll is scrolling from outside the layout, on the very right edge of the screen, but it's not intuitive. I think I have tried all HitTest combinations combined with all Touch>InteractiveGesture>Pan=True|False to no avail. Tried using TImage instead of TGlyph. Same thing Just in case it's useful, I'm placing that TGridLayout in a TFrame. So I have also moved the OnClick event from the Glyph/TImage to the main GridLayout itself. Same behavior. My guess is that it's either responding to a Click/Tap or a scroll gesture, but can't do both... Still, there are plenty of apps doing this. The Delphi examples provided don't use a TGridLayout unfortunately. Except the ScrollableForm example though: it works. But I can't seem to figure out how the hell I can reproduce this. You can click a control and still scroll the form while pressing the control and dragging. It would correctly respond as a click/tap when not scrolling. My config: TFrame > TVertScrollBox > TGridLayout [> TGlyphs] Did anybody here practice with GridLayout and be able to click any of the grid component AND still be able to scroll the grid on mobile devices? Thanks for any clue. Steve
  13. sjordi

    Scrollable TGridLayout question

    Just for those facing the same problem... If I set the TVertScrollBox on a TForm, it works perfectly. One can both scroll and click on controls. It seems that the problem is when the ScrollBox is in a TFrame. I'll tinker a bit with this and let you know if I come up with a solution... -- EDIT - SOLVED -- Yes it's the case. I now have set my TVertScrollBox into the main TForm. Then when I dynamically add a Frame, I set it with the VertScrollBox as its parent. Now everything works fine. I can click my controls and they respond, and if I click on them and drag up and down with my finger, they do scroll. Technical note: I use Andrea Magni's TFrameStand to do this. When adding a TFrameStand, you can specify the DefaultParent property as the TVertScrollBox ! Don't hesitate to come back to me for details if you hit your head on a wall too 🙂
  14. sjordi

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Did you try to move the metal initialization into the .dpr file? I think it's mandatory. Something like in this example (to adapt for your need) {$IF defined(MACOS)} if TCustomContextMetal.IsMetalSupported then GlobalUseMetal := True; {$ENDIF} Application.Initialize; Application.CreateForm(TFormMain, FormMain); Application.Run; I faced several problems when in the main application, it didn't work or even produced errors. Someone here told me that, according to the documentation this has to be set into the DPR file.
  15. sjordi

    Scrollable TGridLayout question

    Hi, Well, this would make it very laggy and difficult to scroll naturally like the platform does natively. But I'm sure it's just a matter of properties. I'm going to deeply study the ScrollableForm example tonight as this one works naturally without extra tricks.
  16. sjordi

    Application to generate all cross platform images

    Unfortunately I think it's a macOS only command On Linux, something close to it is imagemagick A quick google search didn't really result in finding something for Windows.
  17. sjordi

    Application to generate all cross platform images

    I do this myself on my Mac. I generate the largest one 1024x1024 and then run this script. It's easy to adapt when a new resolution shows up. generate [path\]iconname.png It will create all required icons for iOS and Android in the generated subfolder generate.sh
  18. sjordi

    Create a bitmap of selected control?

    Yes with fingers, that might be another challenge. I hope to have some testing time over the week-end and let you know
  19. sjordi

    Create a bitmap of selected control?

    Someone posted this example in the German Praxis forum, and it seems to work. I didn't try it yet on mobile devices though. ListViewItemDrag.zip
  20. sjordi

    Create a bitmap of selected control?

    Thanks both. I'll try the demo and your code Serge. Hopefully works as expected... I'll post the results back
  21. sjordi

    IOS 15 suppoort

    After I upgrade iOS I have many 3rd party apps that won't launch with the same error message. Each time I say "Oh no! I need them!". I uninstall them and re-install them and they just plain work without anything done differently.
  22. sjordi

    Free SQLite -> Interbase tool?

    Hi, I'd like to test drive Interbase ToGo for perf compared to my current SQLite DB on mobile apps. In real world. Does anybody know of any free tool that can convert to and from Interbase <--> SQLite? I have TMS Data Modeler, but it doesn't transfer data. Any clue would be welcome. Thanks to all Steve
  23. sjordi

    Absolute Database question

    Hi, Just saw the page about Absolute Database from the Embarcadero blog about the secret alternative for SQLite... But I asked them, but they didn't answer... To me being an alternative to SQLite means it's cross-platform. Is this the case? Absolute seems to be only Windows. Didn't find anything on their website. Any experience with that tool to share with the community? Thanks
  24. sjordi

    IOS 15 suppoort

    Yes I found that XCode being upgraded from the AppStore is sometimes, not always, a pain, taking hours to finalize the latest 2%. But it always eventually fully upgraded. Now it's unknown why it takes so much time, not being related to a relatively quick download, it's really the upgrade process that seems screwed.
  25. sjordi

    RAD Studio 11 Alexandria is now available

    It looks like it's working now to install... they probably solved the license problem on their side. Just launched it and it went through without problems. I'm not presented with the platform selection install dialog box. Good!!!
×