ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

Enhanced Icon Editor

cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontally Centering Text Question

Here's a little question, I'm trying to get the auto-text centering to work with this template and it's not behaving...

Horizontal Centering Question.png

This then begs the question of how do I specify the area of my template to constrain the horizontal centering? or even, what are the rules the Icon Editor uses when deciding how to vertically center text?

Thanks!

Shaun

0 Kudos
Message 1 of 3
(4,435 Views)

I was playing with different type of templates yesterday [with banner on top left right or bottom, even with double banner (like your example)].

I think (from experience, not from looking at the code) that the IE support only banner on top and that anything that is below is reserved for the "icon text".

PJM



  


vipm.io | jki.net

0 Kudos
Message 2 of 3
(3,476 Views)

Hey Shaun,

Philippe is right, the IE doesn't support double banners right now. The VI that is responsible to find the correct location is..\National Instruments\LabVIEW 2009\resource\plugins\NIIconEditor\Miscellaneous\Calculate Text position.vi

The code searches always from the bottom to the top. The first thing it does is to determine whether a template is selected. If so, only the template layer is taken into consideration. If not, all layers are put together and the search is processed on all layers.

In either way, as I said already, it starts always at the bottom.

Comment on the BD of the above mentioned VI:

1. Approach: Get the bottom line. If the bottom line is transparent, go line for line up and search for the first solid horizontal line.
                      If nothing is found, go on to 2.
2. Approach: Get the bottom line and if its color is different from transparent and if it is a solid line, search from bottom to top for the
                      same line. If nothing is found go on to 3.
3. Approach: Search for any solid horizontal line. If nothing is found go on to 4.
                      Big problem: What is the background color of the icon and what is a valid line? Best guess is a histogramm to check out the
                      BG value, whereas the border line must not be considered
4. Approach: Take the default boundaries.

The template that u are using is caught by #2.

If approach #3 would come first and if it would be modified a little bit, it would discover the correct boundaries for the text.

I hope to see/get many templates to discover whether a modified version of #3 is applicable in 99.99% of the cases to cover templates/icons that do have header and footer.

0 Kudos
Message 3 of 3
(3,476 Views)