Boolean text, font scaling nightmare! example vi attached

Hello, 
I've been trying to scale some boolean text with some constraints: that the text is locked-to-center, and that the VI scales with window size.
What I want to do is scale the boolean text with the window size in some intelligent way. There is a minimum window size, and hence a minimum font size.
Attached you'll find my current attempt, and see what is going wrong. When the font gets too big with respect to the button size (which Labview is controlling automatically), LabVIEW automatically enlarges the button size - so I get a feedback loop: the font gets bigger because the button gets bigger, and vice-versa! With the result that upon scaling the window and then shrinking it back down, does not return the original font/button size. In fact, if you play with the VI I have now, hit the maximize button a few times and you'll see the button keep growing and growing in size! 
Does anyone have any suggestions? I'm pulling my hair out here... Thanks. 
Attachments:
FontScaling.vi ‏14 KB

You need to set the sizes of the buttons as well as the font size when the Panel size event occurs.
You don't necessarily need to kill autoscale for all items.  If you have objects that work fine, then leave them alone.  Just disable autoscale for the problem buttons and handle them programmatically using references and property nodes.
The problem with anything with autoscaling is that the window could easily mess up after a while.  Take something double, half, double, half, numerous times, you won't necessarily wind up with what you started with.  The problem with windows is that all the size and location properties are all integer based, but scaling is inherently going to have fractional numbers involved which must be coerced to integers.
Any program that looks like it handles window scaling smoothly is able to do it because the programmers put in a tremendous amount of background code to make sure it happens correctly.
Anything you do with scaling should be based off the new dimensions being proportional to a theorectically perfect window;  an original guideline.  Don't do things that are proportional to the last window size (which is what LabVIEW autoscaling does) because it quickly falls apart when you deal with large ratios or scaling to very small ratios.

Similar Messages

  • How to use different font styles in the same boolean text?

    Hi all,
    As reported here http://digital.ni.com/public.nsf/allkb/6BD344ACA4DEE20A8625692700737E16, it is possible to change font color, size or other font properties of a subtext in a string indicator. This can be applied to a caption too.
    I'd like to apply this properties to a boolean text but it does not work. The boolean control has the Text.selectionStart and End property node but it does not appear to function.
    Can you help me?
    Thanks all

    This is a bug in the development environment (I think it showed up around LV8).
    There's a workaround, but it seems to work intermittently: Place some floating text on your front panel, then edit it's font styles.  Select and copy the floating text.  Select the boolean text (double click on it).  Paste.

  • Center custom boolean text

    Hey everybody, just a quick cosmetic question.  I have a customized OK button that has two lines of text when false, and only one line of text when true.  I'd like to center the one line of text vertically on the button, but it seems like it has to stay on the same text lineup as the false case.  Is there a quick way to do this?  If I have to get into custom picture controls and stuff, I can ignore the problem.  It's purely cosmetic preference.
    =============
    XP SP2, LV 8.2
    CLAD

    Hi all,
    I came across the same problem and want to  describe it a bit more precisely. When I change the boolean text in the value change event of this button, I notice this unwanted behaviour. But when I set the Bool- text in another frame of the event structure, all works fine. It is the same, if I unset the "Lock Front Panel..." checkmark in the event- structure dialog. For better understanding I attached a example- VI.
    Another point is illustrated in the VI as well, whenever I add a "Panel Close?"- filter event, the terminal "Discard" is always shrinked. This seems to be a bug too.See picture below:
    Btw. I use Lv 8.6.1.
    Greets, Dave
    P.S. I "solved" the problem by using the "Strings[4]"- Property, there this problem doesn't occur.
    Message Edited by daveTW on 06-05-2009 01:49 PM
    Greets, Dave
    Attachments:
    Boolean test Problem.vi ‏13 KB
    Panel Close Filter Event.png ‏3 KB

  • Boolean Text to Array

    Hello,
    I'm just wondering if there is a much easier way to do this.  Basically, I have a few boolean check boxes associated with frequencies.  If the user wants to test the frequency, then they can check the box.  I need to take those frequencies and put them into an array.  The example I show has only 3 frequencies.  However, the real program has a lot more.  Is there a faster way to get the Boolean Text Label in order to convert the label to a frequency array.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    BooleanToFrequency.vi ‏10 KB

    aeastet wrote:
    That is about the easiest way you can do it.
    You give up too easily...
    Since you're using individual controls you have little freedom. You could access the front panel's Controls[] property and auto-index a for-loop to get the ones that are your frequency checkboxes. This isn't difficult, and it would scale nicely since it would be a loop. A simpler method is to use a group control like a cluster. A cluster also has a Controls[] property. I would also suggest using the Caption property as the frequency this way you can convert the Caption property directly without having to typecast the control to the more specific Boolean class. See attached example.
    Attachments:
    BooleanToFrequency_MOD.vi ‏10 KB

  • How to fix the with of buttons when boolean text is too wide

    I need to change the boolean text of boolean. But the size of buttons is increasing when the text is too wide.
    I have created a SubVI to avoid that. But it is taking some time to compute...
    If anyone has a better idea...
    The reason why I need that is becase I don't have control of what the user will put in the button.
    See the example attached.
    Attachments:
    ButtonWithProblem.llb ‏53 KB

    Right-Click on the Booleans and select "release text". This will decouple the size of the boolean from the size of the text.

  • Is there a way to have hardware acceleration without the text font change? + Eye straining firefox!

    Is there a way to have hardware acceleration without the text font change? I remember there was a way to go into settings before and getting hardware acceleration to work without the font change. Unfortunately I lost ALL my previous setting when uninstalling the beta ver Nightly and clicking delete settings :(.
    Also, I fixed a problem before where firefox was visually eye straining to me, I think it was some settings in anti-alias tuner, but I cant seem to find the right settings that puts less strain on my eyes, anyone know? Thanks ahead. Currently using FF7.

    Try to toggle some Boolean gfx.font_rendering prefs on the about:config page to disable some features.<br />
    Filter: gfx
    Others to try:
    * set gfx.direct2d.disabled to true to disable Direct2D
    *Anti-Aliasing Tuner: https://addons.mozilla.org/firefox/addon/anti-aliasing-tuner/

  • Why can I change the callout text font in some documents and not others?

    By experimenting I have determined that some documents that will allow me to add callouts also let me change the text font to a different font or font size.  Other documents that will let me add callouts will not allow me to change the text font. A specific example is that I can add callouts and change the callout's font in pdf's I create by printing from Word, but a datasheet I have from a manufacturer I use will allow me to add callouts but not change the callout font.  Why can't I change the font in callouts I add to the datasheet?  I am using Acrobat 9.5.2.  Thanks for the help.

    Thanks Bob, I didn't think of that, I suppose that would work.  Basically I would just like to have more text sizes to choose from in the drop down menu, I guess its more an issue of laziness on my part than anything else.  I could make a character style for it, but then I'd probably have 10 different character styles just to change the size of my text when it would be less hassle just to type in the size I need.  I was just looking for a quick fix default option that I was used to having at my old job.

  • How do i restore default text/font settings for fire fox?Text is not displaying correctly some letters not dark and see odd characters inplace of letters in words

    How do i restore my text so that all words are uniform in darkness?Now some letters are fragmented or missing a part of it and see odd characters instead of letters in some sentences.Ive tried different fonts in the Options still the same.Would like to
    be able to restore my default settings for text/fonts.Would that eliminate this problem?

    Try to set the Boolean pref <b>gfx.font_rendering.directwrite.use_gdi_table_loading</b> to <i>false</i> on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • Show T and F boolean text simultaneously?

    I would like to show both True and False boolean text values simultaneously at different locations. Is there any way to do this? I want to use a toggle or rocker switch and be able to see both values at all times.
    In an old post Ben and TiTou showed methods to move the text around using property nodes and formating the text with spaces or CR. These only show the selected value, not both.
    If the Label, Caption, and Boolean text are all made visible, the effect can be produced. However, this does not allow for programmatic change of all the text, as for language changes, because the label cannot be changed.
    For buttons (where the boolean text is usually used) it does not matter, but for rocker and toggle switches this would allow a nicer, more professional GUI. I cannot think of a use case for the transitions texts (T>F and F>T) with these switches, but any option to display the boolean texts simultaneously would have to include those for compatibility.
    I have attached a VI which shows the look I would like to achieve.
    Lynn
    Message Edited by johnsold on 07-03-2008 09:52 AM
    Attachments:
    Show both boolean text.vi ‏9 KB

    Hi Lynn,
    I would use a simple text indicator (classic look, set to transparent) to immitate that behaviour. Instead of changing the boolean state texts you simply write to that indicator...
    Just a thought: you can create an XControl to hide that functionality from your block diagram
    Btw.: Where's your vi? Ok, now it's there...
    Message Edited by GerdW on 07-03-2008 03:53 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Bug? Button Appearance is changed with hidden boolean text

    I encountered the following problem with customized buttons:
    I created a button,  made label, caption an boolean text invisible, then added a picture to decal and resized the button to fit to the picture. This means, i had to decrease the width. Everyting works fine on my development machine. There is installed LV2012f3 on Win7 x64.
    When I open the VI or the created EXE on my Laptop, the Button changes in size and position. There is the same LV Version installed on WinXP 32bit.
    This problem occurred with only two of several buttons. The other buttons didn't show this behaviour.
    The pictures below illustrate this problem.
    Now I found out, that the hidden boolean text was the reason for this behaviour. Because at these two buttons the boolean text is wider than the actual width of the button, LabVIEW resizes the button when opening in a different runtime environment(?)
    So the workaround is, to delete the unneeded boolean text.
    Greets, Dave
    Attachments:
    Buttons Win7 x64.png ‏16 KB
    Buttons WinXP.png ‏9 KB

    I think the logic behind this behavior is that while the text is hidden, you could show it programatically and presumably you wouldn't want the button size to change at that point, so the text is taken into account even if it's hidden.
    Of course, you could also change the font size at run-time, which would also change the control size, so it could be argued that the control should only grow when you show the text.
    Either way, I don't think this is so much a bug as it is unexpected behavior. The argument for how it should actually behave could go either way.
    Try to take over the world!

  • Font Scaling Broken with 11.0.07 Update

    I am using Adobe Acrobat XI and since the update to 11.0.07, font scaling is broken.  The menus use to obey the Windows setting for font scaling.  I have my font size set to 125%, so in previous versions, the menu fonts were 25% larger.  Since the update the fonts are always small.  This problem appears to be caused by a new feature (bug?) called HD DPI where instead of matching the Windows font size it will either be 100%, which is my case is small or 200% which is obnoxiously large, and nothing in between.  Can this please be fixed in the next update?

    Hi Luc,
    The drop down menus are no longer following the PPI setting in Control Panel, since the update to 11.0.07.  It looks like the menu bar may be the correct size but when you pull down the menu the text is smaller.  Here is a screen shot of the menu vs the one from Notepad.  The menu text in Acrobat is much smaller.  The menu text was a similar size prior to the 11.0.07 update.  The same problem occurs in the Tools and Comments menus.
    Thank you,
    Gary

  • Wrong font scaling after Report exported2pdf?

    Hi,
    I'm trying to export a DIAdem report as PDF-document, but the Font is scaled wrong on my machine, because the width of the font is too big.
    By the way, I'm using DIAdem 11.0(German). Furthermore I tried to export my report on another machine and surprisingly the font was scaled appropriate.
    However it doesn't make a difference which font I'm using because every font is scale wrong. 
    Attached you can find the PDF with bad scaling.
    What could be the reason for that behavior? Are there any special settings?
    I would be happy about some hints on that issue.
    thx
    Attachments:
    verzerrterText.pdf ‏42 KB

    Hi Brad,
    First of all, thank you for the quick feedback.
    I'm exporting the PDF interactively.
    Enclosed you find a picture showing the differences in the Font scaling.
    The top picture shows the PDF I exported on my machine (a laptop-computer with Windows XP SP2/DIAdem 11.0) which delivers the wrong scaling.
    The picture below shows the way how the PDF should look like, hopefully you can see the slight difference. The correct PDF I've exported on my colleagues machine (Desktop machine with Windows XP SP2/DIAdem 11.0).
    Anyway, I don't have a glue what could be the reason for this behavior.
    If you need any further files please let me know.
    Many Thanks
    Wolfgang
    Attachments:
    TextDifferences.PNG ‏99 KB

  • Boolean text disappeared after exe creation

    Hello!!!
    I deploy a touch panel exe on a National Instruments Touch Panel. The exe contain a boolean indicator-LED which is supposed is set to show boolean text (multiple strings function is also ticked). However this function doesn't work that means that boolean works properly however no text is visible. Can somebody help with this?
    Thanks in advance  
    Solved!
    Go to Solution.

    Good Morning thorfano,
    You should not need to do anything special to get these to work.  If you try to run a TPC VI without having a Build Specification
    I attached a .zip with my .lvproj and .vi.  You should be able to unzip the files and open the project.  The only thing you will need to change is the IP address of the TPC in its properties window.
    I also attached the TPC .exe to which this project compiled.  However, Don't download this file from the forum until you have tried to compile the project yourself.  I want to see if there is something wrong with your compiler.
    Message Edited by AE Charlie on 04-13-2009 11:38 AM
    Regards,
    Charlie Piazza
    Staff Product Support Engineer, RF
    National Instruments
    Attachments:
    boolean text test proj.zip ‏5 KB
    EXE test TP VI.zip ‏250 KB

  • Array of buttons with different boolean text ?

    I'm looking for a method of displaying a 2D button matrix with
    different boolean text on each button. It seems an array of booleans
    must all have the same text. Perhaps a cluster could be used, but the
    array makes button alignment easy and easy to determine which had been
    pressed (radiobutton style with only one button true at a time).
    Steve

    On 6 Dec 2002 05:31:21 -0800, [email protected] (humenik) wrote:
    >[email protected] (Steve Parus) wrote in message news:<[email protected]>...
    >> I'm looking for a method of displaying a 2D button matrix with
    >> different boolean text on each button. It seems an array of booleans
    >> must all have the same text. Perhaps a cluster could be used, but the
    >> array makes button alignment easy and easy to determine which had been
    >> pressed (radiobutton style with only one button true at a time).
    >It's easy to make them individuals in a cluster, and on the block
    >diagram use Cluster To Array to get it into array form for
    >manipulation. This can be superior to an array of buttons, not merely
    >because the buttons can thereby have differing colors and text. An
    >array of buttons cannot have the buttons Latched When Pressed; when in
    >a cluster, however, the latching action is available.
    When might that Latched When Pressed behavior be useful ? Using a 2D
    array of buttons (not cluster), in LV 6.1, a Value Changed event for
    the array can be used as you mention below to XOR the event's OldValue
    and NewValue and wire that to a local variable copy of the array.
    This easily gives a radio button effect for the entire 2D button
    matrix. The array control automatcially arranges the visual
    alignment of the buttons.
    For the cluster method, I'd like to programmatically change which
    button is true. All the approaches I come up with end up using
    Array-to-Cluster which then requires the cluster size to be specified.
    I may end up wanting to programmatically vary the number of buttons in
    both dimensions and hence the cluster size. LV's Align Objects and
    Distribue Objects ends up making the button visual alignment not
    difficult (for a 12 x 8 matrix).
    >Try this: take a cluster of four PB's (latched when pressed) put
    >inside a while loop. Initialize a boolean array of 4 to FALSE outside
    >the while loop, and attach it to a shift register input on the left
    >side of loop. Inside the loop, convert your cluster to an array. XOR
    >the shift register with this array from the buttons, and wire this to
    >the output shift register and to an indicator array. Set the boolean
    >to the loop so it will run free and start it up; on the control panel,
    >click on the PB's and you will see the outputs toggle.
    >
    >Greg

  • Mixed formating on boolean text

    Is it possible to programatically set boolean text on a control with mixed formating, e.g. 1 word in bold and one not. It is possible to do it manually.

    Actually, with later versions of LV, you should
    be able use the Boolean Text properties for Font
    and such.
    To apply the properties to just a subset of text
    use the selection first and the property change
    will only affect the selected text.
    Greg McKaskle

Maybe you are looking for

  • BDC table control using Excel sheet upload

    Hi All, I am working BDC table control.I want to upload the From excel sheet.I am using the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the the data into my internal table.The data is populating in the internal table. Now i have problem tat how to popu

  • ORA-04091 mutating table error

    Hi, Using Oracle 8.1.7 on Windows 2000. I am trying to write a trigger that fires at each insert my Java application executes in my_table, when the trigger is supposed to update, on the just inserted row, the code field. I created my trigger to fire

  • Query on 0PERS_VAR

    Hi, I have written a query on 0PERS_VAR which stores personalization data in the ODS. When I run the query I get the message "No applicable data found". Can someone shed any light on this please. Cheers, Michael

  • Oracle 8i install on NT server

    Hi, I have downloaded the NT Oracle 8i trial version, and during the installation, at sample DB creation time, I get the following ORA-12560: TNS error: protocol adapter error In the pdf doc on errors, it says stuff that we should be checking only af

  • I just purchased Acrobat XI for Mac, downloaded/installed on my MacBook Air, but the software will not open/initialize.  What is the problem?

    I just purchased Acrobat XI for Mac, downloaded/installed on my MacBook Air, but the software will not open/initialize. What is the problem?