Using TMSFMXNavBar and attempting to create items programmatically as such:
At runtime there is no caption displayed on header or selection buttons.
Adding panels at design time renders these captions correctly.
Is there something I am missing? the documentation on this component is limited and suggests the above will work.
I tested this here with code:
cp := TMSFMXNavBar1.CreatePanel;
cp.Caption := 'New panel';
and this adds a panel with its caption.
tried that and still not getting the caption visible on the control. I am switching this in and out of being visible but that shouldn't be problematic. I have change no other properties other than dropping this on a TMultiView.
Tried adding a panel at design time and then adding new panels at runtime and the design time panel shows the caption, whereas the runtime still not displaying
FYI removing this onto a normal panel and not the FMX multiview component remedies the problem!
There must be an interference from the multiview then. Are you executing the code to add a panel in the form create or form show or later time, from a button for example?
Good thought! By placing code in onshow method the problem is resolved.