LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean text.Size to text , the boolean text size fixed in my Custom button

Solved!
Go to solution

@paul_a_cardinale wrote:


This is very risky.  The bit meanings of Basic Object Flags can, and sometimes do, change between versions of LabVIEW.


No Risk — no Fun. Any official alternative?

0 Kudos
Message 11 of 19
(675 Views)

There is an INI key that helps with these boolean operations.

 

enableSecretPopups=True

 

Christina talks about it a bit here on LAVA.  After enabling it when you go to customize a boolean you'll have a bunch of new popups for things like centering text, or having the boolean decal grow with the button resize.  This one is particularly useful for vector based images like WMF.

 

It is an undocumented and unsupported INI file so it is possible you can create a boolean that crashes LabVIEW, or does weird stuff, so tread lightly.

Message 12 of 19
(668 Views)

@Hooovahh wrote:

There is an INI key that helps with these boolean operations.

 

enableSecretPopups=True

 

Christina talks about it a bit here on LAVA.  After enabling it when you go to customize a boolean you'll have a bunch of new popups for things like centering text, or having the boolean decal grow with the button resize.  This one is particularly useful for vector based images like WMF.

 

It is an undocumented and unsupported INI file so it is possible you can create a boolean that crashes LabVIEW, or does weird stuff, so tread lightly.


Yes, that was my initial idea, but in this particular case the options looks exactly the same for both "original" and "modified" controls, so I wasn't able to revert "Size to Text" back with this (played only a little bit):

Screenshot 2024-05-08 15.17.27.png

 

On the other hand, this is undocumented, you're right, may be some additional menu or option exists, who knows.

0 Kudos
Message 13 of 19
(659 Views)

@Andrey_Dmitriev wrote:

Unfortunately this will help only partially, because "Size to Text" will remain inactive, in aditional, this will cause overlap with icon if Boolean Text should be not centered absolutely:

Screenshot 2024-05-08 06.08.29.png


You can define your own "center" in Customize Mode by move an already centered Boolean Text to a new position.

The LockBoolText property node will not move the Boolean Text back to the original center.

 

 

George Zou
0 Kudos
Message 14 of 19
(635 Views)

@zou wrote:

@Andrey_Dmitriev wrote:

Unfortunately this will help only partially, because "Size to Text" will remain inactive, in aditional, this will cause overlap with icon if Boolean Text should be not centered absolutely:

Screenshot 2024-05-08 06.08.29.png


You can define your own "center" in Customize Mode by move an already centered Boolean Text to a new position.

The LockBoolText property node will not move the Boolean Text back to the original center.

 

 


This is true, you're perfectly right, but this will not help to "grow" the string in attempt to put longer text like it growing when Size to Text Option set (like Labels/Captions) for example. As result I should not only move it, but also resize to maximal possible length, which is quite inconvenient, especially for localized application, where length may vary. I have had already "trimmed" text in rare cases where Boolean text was touched occasionally.

0 Kudos
Message 15 of 19
(632 Views)
Define a new center is just for avoiding Boolean Text overlap with the icon.
George Zou
0 Kudos
Message 16 of 19
(626 Views)

@Andrey_Dmitriev wrote:

@paul_a_cardinale wrote:


This is very risky.  The bit meanings of Basic Object Flags can, and sometimes do, change between versions of LabVIEW.


No Risk — no Fun. Any official alternative?


The attached is much less risky.

0 Kudos
Message 17 of 19
(611 Views)

@paul_a_cardinale wrote:

This is very risky.  The bit meanings of Basic Object Flags can, and sometimes do, change between versions of LabVIEW.

For instance, on LV 2021 BOF returns 60000 hex regardless of whether STT is True or False.


My mistake.  It's still the same in LV 2021.

0 Kudos
Message 18 of 19
(606 Views)

 

0 Kudos
Message 19 of 19
(568 Views)