LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Property to set hex/binary/decimal format at run time?

Hi, I'd like to allow my user to choose between hex/binary/decimal formats in his number input. I'm happy to do the radio button stuff and the code to "hear" what he wants, but I can't find a property of my variable which selects the format at run-time - there is of course the "Format & Precision..." which I can get at by right mouse click BEFORE running, so I know it's likely to be available at run-time. Any suggestions welcome. Thanks, Richard.
0 Kudos
Message 1 of 5
(2,530 Views)
Richard,
It might not seem ideal, but you could have the user enter data into a general text box, then the user selects which mode it is (hex, bin, dec), and then a set of Cases processes accordingly using "Format & Precision", etc.
Or, the user first selects which mode, which causes the appropriate control entry box to become visible and the others are hidden.
Lots of options... Good luck with it, Doug
0 Kudos
Message 2 of 5
(2,530 Views)
It's not necessary to use property node because you can use the builtin
property of the indicator.
Click the rigth mouse button over the indicator and select show radix.
On the left side of the indicator appear radix that you can push to choose
between hex, binary, octal and decimal.

Bye
Golzio

"R" ha scritto nel messaggio
news:50650000000800000058350000-1007855737000@exchange.ni.com...
> Hi, I'd like to allow my user to choose between hex/binary/decimal
> formats in his number input. I'm happy to do the radio button stuff
> and the code to "hear" what he wants, but I can't find a property of
> my variable which selects the format at run-time - there is of course
> the "Format & Precision..." which I can get at by right mouse click
> BEFORE run
ning, so I know it's likely to be available at run-time. Any
> suggestions welcome. Thanks, Richard.
Message 3 of 5
(2,530 Views)
Use the Format & Precision>>Format property in a property node. See the attached file.

Brian
0 Kudos
Message 4 of 5
(2,530 Views)
> Hi, I'd like to allow my user to choose between hex/binary/decimal
> formats in his number input. I'm happy to do the radio button stuff
> and the code to "hear" what he wants, but I can't find a property of
> my variable which selects the format at run-time - there is of course
> the "Format & Precision..." which I can get at by right mouse click
> BEFORE running, so I know it's likely to be available at run-time. Any
> suggestions welcome. Thanks, Richard.
>

The numeric properties list both the format and precision. You should
be able to do what you want with that. Read the radio button setting,
select the format and write to the property node for format.

Greg McKaskle
0 Kudos
Message 5 of 5
(2,530 Views)