ok, I was able to get it really close but creating my own Multibutton and
then overriding calcPreferredSize() for the container. (it worked using
setPreferredSize() on the container, but of course there's that deprecated
warning). I dont get the ellipses though
Container cnt = new Container(layout) {
@Override
protected Dimension calcPreferredSize() {
return new Dimension(
(int)(Display.getInstance().getDisplayWidth()*.2), 75);
}
};
On Monday, October 3, 2016 at 7:54:09 AM UTC-7, [email protected] wrote:
>
> The table approach is what I use in other parts of the app and works well,
> however there is another aspect of this particular form. Let me describe
> the form completely
>
> TitleBar has 3 buttons, on of which is "Show List"
> BorderLayout.CENTER is MapContainer
> BorderLayout.WEST is properties panel
> BorderLayout.EAST is container with list of multi buttons
>
> (BTW, it is slightly different in portrait...i use BorderLayout.SOUTH for
> the list of multi buttons)
>
>
> The map will have N number of markers based upon a user query. Normally
> the map is 100% of the screen. If the user so desires, they tap on the
> "show list" command which will make the list visible so they can quickly
> see brief information. Tapping on a marker brings up the properties for
> that particular item. If the properties panel is already visible it just
> fills the fields, otherwise it creates one. Tapping on the X in the
> properties panel hides it. The map and list and properties panel must all
> remain functional while one or all of the panels are visible.
>
>
> So with that information, is it possible to add / remove panels from a
> tablelayout based upon user interaction? If so how? Do I need to save the
> component, or can I retrieve it like with BorderLayout?
>
> Peter
>
> On Sunday, October 2, 2016 at 8:27:10 PM UTC-7, Shai Almog wrote:
>>
>> I would avoid setPreferredSize in general especially since 25% might vary
>> based on device orientation etc.
>>
>> I would also avoid the border layout as it doesn't work well in such use
>> cases.
>>
>> A 2 column table layout with 25 width and 75 width and 100 height for
>> both should work for this case.
>>
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/dd192116-6939-407c-a208-3c777b125c9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.