Jump to content

sjordi

Members
  • Content Count

    196
  • Joined

  • Last visited

Posts posted by sjordi


  1. 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)

     


  2. 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


  3. 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


  4. 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


  5. 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 


  6. 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


  7. 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.

    • Like 1

  8. 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.

     


  9. 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 🙂 


  10. 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.

     

     

     
    • Like 1

  11. 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.


  12. 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. Hi,

    I'm implementing a drag&drop process in a TListView and I'd like to animate the selected Item (or group item).
    For this I think we would need to create a bitmap of the selected item to be able then to move it around in the drag process.

    Is there any way to actually determine the coordinates, width, height of the Item, and make a bitmap of it on the fly?
    Thanks for any clue about that.

    Steve


  14. On 9/22/2021 at 12:30 AM, billyb said:

    Dave,

    I just got an email saying that when the customer tried to run our program they got an error telling him it needs to be updated to be compatible.

    When I asked it program ran after the error message i was told no. I have no further info.

    I am upgrading one of my ipads to IOS 15 to see what happens and will post the results.

    My program runs fine on IOS 14.8

     

    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.


  15. 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.


  16. 3 minutes ago, Skrim said:

    Does not work for me, The new version 11 is NOT listed, even after clicking Update.

    I have contacted Support several hours ago, no answer yet.

    This is not a nice experience.

    Ole

    Worse for me. The 11 version IS listed but to no help.

    Remove it, blank, add it. Says ok. But then complains about needing a valid license (copy/pasted from the My Embercadero portal, so no typo)

×