How to limit the spacing between 2 or more TABS (Left Orientation)

66 views
Skip to first unread message

Mark Bolduc

unread,
Sep 6, 2019, 4:05:58 PM9/6/19
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA Netbeans 11
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, IOS, Android

Is there a method that will limit the spacing between tabs particularly when there are only 2 tabs, the Tabs tale up 100 % of the realestate.

See attached pick as example (I am using Left orientation of TABS)

Regards
TabsSpacing-09-06-2019.png

Shai Almog

unread,
Sep 7, 2019, 12:44:57 AM9/7/19
to CodenameOne Discussions
Try setting the theme constant tabsGridBool to false.

Mark Bolduc

unread,
Sep 7, 2019, 9:15:47 AM9/7/19
to CodenameOne Discussions
Have loaded my theme component and seems unable to add the constant tabsGridBool

Please see attached. When I click OK, the dialog closes and the constant is not added to the list (empty)

Thoughts?


On Saturday, September 7, 2019 at 12:44:57 AM UTC-4, Shai Almog wrote:
AddTabsGridBool.JPG

Shai Almog

unread,
Sep 7, 2019, 11:22:38 PM9/7/19
to CodenameOne Discussions
It's a boolean which means you need to check/uncheck the box to set it to false.

Mark Bolduc

unread,
Sep 10, 2019, 2:03:44 PM9/10/19
to CodenameOne Discussions
I understand, however in doing this, clicking OK never adds it to the list,

I click Add (See Attached AddTabsGridBool_1.JPG), it opens the dialog AddTabsGridBool.JPG, I set Constant to tabsGridBool and toggle the Value checkbox until it is set to false. as seen in attached AddTabsGridBool.JPG. I click on OK and expect to see this key added to the constants table seen in AddTabsGridBool_1.JPG, however it is empty.

Thoughts?
AddTabsGridBool_1.JPG

Shai Almog

unread,
Sep 10, 2019, 10:39:54 PM9/10/19
to CodenameOne Discussions
You typed mpiTabMeta in the search, could that search have hidden it?
I only see one image here.

Mark Bolduc

unread,
Sep 11, 2019, 10:00:52 AM9/11/19
to CodenameOne Discussions
Yes, I wanted to only affect the one image.

I see, it appears the Constants apply to  all style images.

Is this correct?

If so, whats the thinking behind this?

Regards.

Mark Bolduc

unread,
Sep 11, 2019, 10:32:30 AM9/11/19
to CodenameOne Discussions
Changing this key to false, does eliminate the global sizing of tabs, however there are many other unwanted side affects with other objects like buttons, dialogs, ComboBoxes etc.

Look at AddTabsGridBool_2.JPG compared to AddTabsGridBool_3.JPG
See how the random Horizontal Tab is inconsistent with other tabs. Look at AddTabsGridBool_4.JPG compared to AddTabsGridBool_5.JPG

Also Please look at AddTabsGridBool_5.JPG and AddTabsGridBool_7.JPG


Thoughts?
AddTabsGridBool_2.JPG
AddTabsGridBool_3.JPG
AddTabsGridBool_4.JPG
AddTabsGridBool_5.JPG
AddTabsGridBool_6.JPG
AddTabsGridBool_7.JPG

Shai Almog

unread,
Sep 11, 2019, 11:05:49 PM9/11/19
to CodenameOne Discussions
These look like you changed the entire theme and not just that constant. What did you do exactly?

Mark Bolduc

unread,
Sep 12, 2019, 11:14:10 AM9/12/19
to CodenameOne Discussions
Initially I filtered on th the  "mpiTabMetalSelected" Theme image See AddTabsGridBool_12.JPG
Then I clicked the "Constants" Tab where I attempted to add tabsGridBool to the filtered theme image., However when click OK, New Constant does not appear in the list. See AddTabsGridBool_13.JPG & AddTabsGridBool_14.JPG

Now if I remove the filter, all the theme images contain this constant. See AddTabsGridBool_15.JPG

So how do I set this constant for specific theme images?

Thoughts?


On Wednesday, September 11, 2019 at 11:05:49 PM UTC-4, Shai Almog wrote:
AddTabsGridBool_12.JPG
AddTabsGridBool_13.JPG
AddTabsGridBool_14.JPG
AddTabsGridBool_15.JPG

Shai Almog

unread,
Sep 12, 2019, 10:37:46 PM9/12/19
to CodenameOne Discussions
That's just a bug in this old UI. Click the theme again and select the constants tab it should have the right value.

Mark Bolduc

unread,
Sep 13, 2019, 12:10:16 PM9/13/19
to CodenameOne Discussions
Seems when I add this constant, it is applied to all images.

I deleted the constant, saved my theme. closed the Codename One Designer Theses Dialog
Restarted, w/o selecting any image and clicking on constants, I see the key tabsGridBool set.

Perhaps I am not undersytanding how to manipulate this.

In the Theme Images list, I assume I would select an image (Now "mpiTabMetalSelected" highlighted Unselected Tab) and click on Constants, then manage the keys in the Constants list.

All approaches have apparently made global changes to all images.

Thoughts?


On Thursday, September 12, 2019 at 10:37:46 PM UTC-4, Shai Almog wrote:

Mark Bolduc

unread,
Sep 13, 2019, 12:19:30 PM9/13/19
to CodenameOne Discussions
On another note, do you think I am potentially building a UI that is too demanding for mobile devices?
Should I be thinking much less complex?
I like to give usere as much of a feature set that the they have in the Swing App.
I am acustom to Swing apps for decades.

Thoughts?

Shai Almog

unread,
Sep 14, 2019, 12:44:43 AM9/14/19
to CodenameOne Discussions
They don't actually change the images, it's just a rendering bug. If you click the themes again you'll see all the constants back to normal.

I find that we need to take complex swing/desktop UI's and break them down to more forms when moving from desktop to mobile.

Mark Bolduc

unread,
Sep 14, 2019, 8:35:32 AM9/14/19
to CodenameOne Discussions
Thanks.
Sorry to take up so much of your time.

Do you predict in a couple of years the hardware will better support more complex UI's?

For me it makes sense as our product is primarily used on PC's using Swing and so to provide functionality in the mobile devices that are farmiluar to them makes it more attractive as the users do not have to learn 2 different apps.

The PC app is extensivly used in the office while things like greeting a customer or performing an extensive multipoint inspection in the shop or while driving a customer home and taking photos in real-time in important.

Seems like moving from form to form, looses the information from the previous form that I may be relevent to this form.

Then when I go back, I have to reload all the data.


Thanks for all your help.

Regards

Shai Almog

unread,
Sep 14, 2019, 11:32:05 PM9/14/19
to CodenameOne Discussions
Hi,
no.
The physical limitation is the screen size/finger size and those won't change ;-)

Even on Tablets which resolved some of the screen size limits the screen is still smaller and the UI elements need to be "finger friendly". So you should stick in more details but not nearly as much as we used to on the desktop. Frankly, it's better in terms of UX and software development. We work with a lot of forms but each one is smaller and simpler, that makes them easier to explain, understand and develop.

We worked with several companies in your position who tried moving a desktop app UI "as is". The results varied. I suggest talking with the users about this and letting them feel the UI. Try it on the target devices early on to see how it feels even without the functionality. When you start using it on a physical device you'll know if you're on the right direction.

Mark Bolduc

unread,
Sep 16, 2019, 3:47:15 PM9/16/19
to CodenameOne Discussions
Thanks.
Reply all
Reply to author
Forward
0 new messages