Did you notice the new component TPresentedScrollBox in Seattle ?

Did you notice the new component TPresentedScrollBox in Seattle ?

there's a demo in C:\Users\Public\Documents\Embarcadero\Studio\17.0\Samples\Object Pascal\Multi-Device Samples\User Interface\PlatformScrollBox

the interessant thing is that you can set the ContentSize, so you can build a virtual container ... I hope that ListView will use this in the next release instead of loading all the items !

Comments

  1. I saw it in the release notes, but I haven't yet dropped it in an app and see what it does. Can you give a quick summary, please?

    ReplyDelete
  2. FMX.  There's a new set of "presented controls" which seem to implement some kind of data -> model -> presentation layer.
    http://docwiki.embarcadero.com/Libraries/Seattle/en/FMX.Controls.Presentation.TPresentedControl.

    I haven't looked into how it works and I'm confused how all that could exist in one class, or what it requires in a UI class that they must all derive from one base class.

    ReplyDelete
  3. David Millington 'Presented' controls is the FMX jargon for a control that can have a platform-native backend. In other words, as well as being a traditional 'styled' control ('FMX-native', so to speak), a 'presented' control can instead be a 'windowed control' in VCL parlance, assuming a platform-native 'presentation' has been implemented. E.g., TEdit is a 'presented' control because you can specify an instance wrap UITextField on iOS or a native EDIT control on Windows.

    'Presented' scroll boxes are a slightly different case, but only to the extent the original, non-'presented' variant (TScrollBox) has been left 'as is' and a new 'presented' version added alongside. Given the special difficulties of making TScrollBox itself a presented control, I can understand the decision to define a new class.

    ReplyDelete
  4. Chris Rolliston Thanks for the explanation - that was a lightbulb moment. It was not something I saw in my (quick, skim) reading :/ I do wonder why they're not called something like TNativeScrollbox - where does "presented" come from?

    ReplyDelete
  5. David Millington - a control that may have more than one 'presentation' [although where the number is hardcoded to a maximum of two in practice]. A windowed control in the VCL is always a native control; a presented control in FMX is only native if you set the ControlType property to Platform, and there's a native 'presentation' for it registered.

    That said, the terminology is arguably a bit confusing even in an internal FMX context. This is because a FMX 'styled' control, at least originally, already separated out visual representation from underlying functionality/data.

    ReplyDelete

Post a Comment