VLFONE Instance List Toolbar command width

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
davidbalansa
Posts: 48
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

VLFONE Instance List Toolbar command width

Post by davidbalansa » Fri Jan 25, 2019 11:33 am

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 2498 times
Regards,
David

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: VLFONE Instance List Toolbar command width

Post by MarkD » Fri Jan 25, 2019 1:23 pm

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

davidbalansa
Posts: 48
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

Re: VLFONE Instance List Toolbar command width

Post by davidbalansa » Tue Jan 29, 2019 12:40 pm

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

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: VLFONE Instance List Toolbar command width

Post by MarkD » Tue Jan 29, 2019 3:27 pm

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

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: VLFONE Instance List Toolbar command width

Post by MarkD » Tue Jan 29, 2019 3:38 pm

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:
Attachments
Capture.PNG
Capture.PNG (14.47 KiB) Viewed 2467 times

davidbalansa
Posts: 48
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

Re: VLFONE Instance List Toolbar command width

Post by davidbalansa » Thu Jan 31, 2019 11:26 am

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 2432 times
Capture2.PNG
Capture2.PNG (17.14 KiB) Viewed 2432 times
Thank you for your assistance!

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: VLFONE Instance List Toolbar command width

Post by MarkD » Thu Jan 31, 2019 2:59 pm

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?

davidbalansa
Posts: 48
Joined: Mon Feb 01, 2016 10:08 am
Location: Australia

Re: VLFONE Instance List Toolbar command width

Post by davidbalansa » Fri Feb 01, 2019 9:14 am

Here is a screenshot of the command handler tabs.

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

Post Reply