Jump to content

sjordi

Members
  • Content Count

    206
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by sjordi


  1. Hi,
    I'm using a TTabControl and the TTabItems show very very small fonts just on iOS.

    If you compile the MultiView demo they provide, you may see this as well, so I guess I'm not doing anything wrong.

    Here is an example of how it looks like on Windows, macOS and Android (fine) and then on iPad and iPhone...

    From top to bottom: Android, macOS, Windows, iPhone, iPad

    The "All" and "Needed" texts are about the same size to the item (toothpaste here).

    On iOS the TabItem font size it's about 20-30% of the regular one.

    I tried Platform behavior or styled to no success

    Any idea?
    Thanks for your lights

    tabitem.png.c0d295636b1ef5bc92d67da7f387386c.png


  2. Ok for those of you wondering the same thing I got an email from Embarcadero.

    You need a IB Server to have change view. It's on the server that lies the mechanism and where the data is processed.
    You can't use change views between, say, two IBToGo, like one on a smartphone and one embedded on a desktop.

    They both would ask to connect to the Server to process the changes. Too bad.

     


  3. The Interbase ChangeView feature is really appealing to me but I was wondering whether you can use this without servers.

    Mainly, I would be interested to use IBToGo on my mobile device apps and the desktop equivalent, which would also have IBToGo.

    All databases embedded only on each device (mobile or desktop).

    Is it still possible to use Change Views between two IBToGo databases with zero IB Server? Just talking from iOS to a Mac or Android to Windows, Android to iOS? In one word IBToGo <--> IBToGo.

    Or do ChangeViews work only via a server tier? What they call the "central database" (reference)...

    Thanks for any clarification.

     


  4. Ok that did it...Almost
    I probably screwed something somewhere in my steps replicating your instructions.

    It works for Windows, iOS and Android but not for macOS-64 where all values are 0.00.

    Any idea why? Is the FilleControlToField behaving differently for macOS?


    For those facing number formatting

    I have a BindSourcePrototype with the field names matching exactly the Database fields linked to the app (via an Adapter).

    So in LiveBindings, I hooked it from the Prototype to the TListview.
    Then, as suggested, I selected the link between the prototype and listview in the LiveBinding Window.

    Then you can edit the link properties  (the TGeneratorFieldDefs property) and set its CustomFormat to DisplayFormat

    Then, in the structure window, select the same field in the LinkFillControlToField branch, open the FillExpressions one, select your field (the one to format)

    ControlMember and SourceMemberName should be hooked to your field.

    But the CustomFormat should be set to Format('%%.2f', %s)

    Then it works.

     

    Thanks a lot.


  5. Euh ben non, il est pas content.

    Adding DisplayText is refused. It complains about that info to be unknown.

    Also if I right-click on the LinkListControlToField object and edit the expressions, all fields are grayed out and DisplayText is actually shown in the disabled fields (in the dialog box)...

    Now where do I specify the format itself, because I guess I still have to do this somewhere?

    Thanks


  6. Hi,

    I have aTListView hooked to an underlying Database where one of the values is a currency, a price.

    My ListView is bound to the DB via a PrototypeBindSource and an adapter to switch from dummy values to the DB content.

    In that Prototype field I have the one field set a currency and its CustomFormat property set to #.00

    I tried any kind of formatting without success. The format is ignored.

    I need 2 decimals, but zeros ( 0 ) are skipped.

    No matter what, trailing zeros are ignored.

    12 is shown as 12 instead of 12.00

    12.6 is shown as 12.6 instead of 12.60

    etc

     

    Any idea? Should I get that value from the DB and format it as a string myself?
    In that case, what's that CustomFormat field worth for?

     

    Thanks for any clarification.

    Steve 


  7. Ok I checked now. My problem is I want to skip the checkboxes. I just want to touch/click an item to select/unselect it.
    Both OnItemClick or OnItemClickEx seem to be triggered, but I don't find a way to update/refresh the listview. My guess is I actually have to hook the click to the underlying database. This way, when data is changed it should update.
    I'm not sure whether there is a way to force a refresh: for testing purpose only I was using the Item.Tag to set it on/off, but obviously it's not enough.


  8. Great,

    I confirm that it now works on iOS... Probably on Android as well but my device is at home.
    Good workaround. I use it to actually change the background for multi-selected items...
     

    for i := 1 to 1000 do
        ShowMessage('Thanks a lot Serge !');


  9. Ok, I won't throw a stone if you don't have Apple devices.
    I tried on my Android system, same thing: Gray interface.
    Now I made sure not to have any styles, and also tried the ControlType of the ListView to be set  to Styled or Platform. No change.
    Smartphones are gray. macOS, Windows are colorful with the color I picked...
    Very strange.

     


  10. Mhh,

    @Serge_G I implemented your code and it works fine except... on iOS. Nothing happens.
    Then I downloaded your code from the website you mention, compiled. Same thing. Ok on macOS, Windows, but not iOS. 

    Don't have my Android device here, so I can't say.

     

    Any idea why damn iOS won't colorize?
    Steve


  11. 2 hours ago, Sherlock said:

    Have you really been able to debug on an iDevice running anything above iOS10?

    Yes, 
    Just tried on an "old" iPhone 6S under iOS 12.4.1
    Xcode 10.3

    RADStudio Rio 10.2.3

    iOS SDK in RADStudio: iPhoneOS 12.2 and 12.4 as well. 

    Here are screenshots of the breakpoint in RADStudio and the "frozen" splash screen of the app at launch, just waiting for me to continue into the code.

    Screen Shot 2019-09-23 at 18.52.40.png

    IMG_2055.PNG


  12. I found an example from Rahiche Raouf, an excellent MVP in Algeria. He has an example on how to colorize a list view by adding a TListItemTextButton

    But unfortunately it seems that it doesn't work in Rio anymore. Modifying text, etc... works fine, but not the TintColor.

    procedure TForm1.ListView1UpdateObjects(const Sender: TObject;
      const AItem: TListViewItem);
    var
       textRect : TListItemTextButton ;
    begin
       textRect := AItem.View.FindDrawable('Rectangle') as TListItemTextButton ;
       textRect.TintColor := TAlphaColorRec.Green ;
       textRect.Text := 'Hello' ;
    end;

    This doesn't seem to work anymore 😞 
    I'll investigate further and post back once (because it will!) it works!!!


  13. Ok after tinkering with it, it seems that there is no way to multi select except when in Edit mode.

    Problem is I absolutely don't want it to be in Edit mode, and I don't want the check boxes to be shown...

    Hard to believe that such a basic feature is not implemented in TListView.

    I tried to work around this by implementing a CustomDraw  mechanism, but even that seems not to be available, rendering ListViews useless in my case...

     

×