Page 1 of 1

VLFONE Instance List Toolbar command width

Posted: Fri Jan 25, 2019 11:33 am
by davidbalansa
I want to access commands via the Instance List Toolbar. I would like to control the width of the command captions displayed. The width seems to be calculated automatically by the VLFONE. Is there any way I can override the width of the command displayed on the Instance List Toolbar?

I can alter the width when displayed on the VLFONE toolbar via the command definition. Maybe it could source the width from the command definition?
Capture.PNG
Capture.PNG (12.24 KiB) Viewed 2548 times
Regards,
David

Re: VLFONE Instance List Toolbar command width

Posted: Fri Jan 25, 2019 1:23 pm
by MarkD
The width is automatically calculated based on the number of characters in the command’s caption, noting that captions are multilingual, so the run time width usually varies by language.

A small width calculation table is set up as part of your VLF theme. You can alter this table if you want. Let me know if you want some sample code to do this.

Also, if you have badges enabled, I think that that reserves 22 pixels to the right of the caption to display any associated badge. https://docs.lansa.com/14/en/lansa048/i ... 8_8210.htm

If you are not using badges you can free up this space by setting UseBadges(False) in your entry point web page. https://docs.lansa.com/14/en/lansa048/i ... =Usebadges

Re: VLFONE Instance List Toolbar command width

Posted: Tue Jan 29, 2019 12:40 pm
by davidbalansa
Hi Mark,

Thank you for the response. I tried setting the UseBadges parameter to false in the VLFONE launch page. I didn't see any distinguishable change in width.

Can I request the sample code to alter the width calculation table of the VLF theme?

Regards,
David

Re: VLFONE Instance List Toolbar command width

Posted: Tue Jan 29, 2019 3:27 pm
by MarkD
Try something like this in your VF_AC033O theme customiser ................

Code: Select all

Mthroutine Name(Customize) Options(*REDEFINE)

For Each(#Theme) In(#Themes)

* Remove the default character width measuring entries already added
#Theme.CharWidths.RemoveAll
#Theme.PixelWidths.RemoveAll

* Replace with your custom character to pixel sizing estimates (these are actually the shipped defaults)
#Theme.AddPixelWidthTableItem Charwidth(3) Pixelwidth(44)
#Theme.AddPixelWidthTableItem Charwidth(5) Pixelwidth(54)
#Theme.AddPixelWidthTableItem Charwidth(10) Pixelwidth(90)
#Theme.AddPixelWidthTableItem Charwidth(15) Pixelwidth(120)
#Theme.AddPixelWidthTableItem Charwidth(20) Pixelwidth(160)
#Theme.AddPixelWidthTableItem Charwidth(25) Pixelwidth(200)
#Theme.AddPixelWidthTableItem Charwidth(30) Pixelwidth(240)
#Theme.AddPixelWidthTableItem Charwidth(35) Pixelwidth(280)
#Theme.AddPixelWidthTableItem Charwidth(40) Pixelwidth(300)
#Theme.AddPixelWidthTableItem Charwidth(999) Pixelwidth(350)

Endfor

Endroutine

Re: VLFONE Instance List Toolbar command width

Posted: Tue Jan 29, 2019 3:38 pm
by MarkD
Of course the less themes you do that to the better, and the less table entries the better.

This is the method used to estimate the widths:

Re: VLFONE Instance List Toolbar command width

Posted: Thu Jan 31, 2019 11:26 am
by davidbalansa
Hi Mark,

Thank you for the code sample. I was able to implement and see the widths change. Unfortunately we don't use images with our command handler definitions and see that the image width is included to the left of the caption in the toolbar command width. Is there anything I can do about the image width?

Capture.PNG
Capture.PNG (4.41 KiB) Viewed 2482 times
Capture2.PNG
Capture2.PNG (17.14 KiB) Viewed 2482 times
Thank you for your assistance!

Re: VLFONE Instance List Toolbar command width

Posted: Thu Jan 31, 2019 2:59 pm
by MarkD
There's really no option to not have an icon.

When you select an instance list item what do the command handler tabs look like?

Re: VLFONE Instance List Toolbar command width

Posted: Fri Feb 01, 2019 9:14 am
by davidbalansa
Here is a screenshot of the command handler tabs.

Capture2.PNG
Capture2.PNG (8.4 KiB) Viewed 2464 times
Thanks again for you assistance.