LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numberic control clear contents

Solved!
Go to solution

hi,

sorry but this is a newbie question........

i have a numeric control with a default value (0.0) on my front panel. 

i want to clear the contents when i click on the control so that when the user clicks the control to enter a value they dont have to delete the contents.......

any help is appreciated.......

thanks.

0 Kudos
Message 1 of 10
(3,104 Views)

A double-click selects all the contents in the control allowing you to start typing.

0 Kudos
Message 2 of 10
(3,088 Views)
You could try using an event structure to look for a mouse up event on the control and clear the contents when it fires.

Mike...;

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 10
(3,073 Views)

What I like to do is use the Mouse Up event to select all of the text inside the numeric control so you get a similar effect to when you use the Tab key to gain focus.  It is very easy to do, simply wire 0 to both the NumText.SelStart and NumText.SelEnd properties.

0 Kudos
Message 4 of 10
(3,060 Views)

Hi loayn,

                                Best way is, there is a invoke node called re-initialize all to default. Invoke this node as soon as your program starts. By default in labview all the numeric control will having 0 as default value.

 

something like this,

 

Hope this will be useful

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 10
(3,047 Views)

@Ranjeet_Singh wrote:

Hi @loayn,

                                Best way is, there is a invoke node called re-initialize all to default. Invoke this node as soon as your program starts. By default in labview all the numeric control will having 0 as default value.

 

something like this,

 

Hope this will be useful


Actually, what you propose does nothing to prepare a control for user input per the OPs use case.

0 Kudos
Message 6 of 10
(3,043 Views)

Hi BillMe,

                       Yead i made a mistake,i didn't read the question properly. Then best way is via tab option, i thinks. By using property node he can fix the sequence of tab operation.

Is this OK ?

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 10
(3,038 Views)
Solution
Accepted by topic author loayn

@Ranjeet_Singh wrote:

Hi @BillMe,

                       Yead i made a mistake,i didn't read the question properly. Then best way is via tab option, i thinks. By using property node he can fix the sequence of tab operation.

Is this OK ?

 

Thanks


Actually, the other option is to tab to the numeric control. It will automatically select the current value so the user can change it. The tab order, however, has hothing to do with the issue.

0 Kudos
Message 8 of 10
(3,033 Views)

Yes it has to do it with issue, When you have 20 controls in row & if you  have not fixed the order than it will go randomly. So tab order needs to be fixed, I know tab order is not as issue, the problem can be solver via tab, i am just telling next thing programmer should take care

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 9 of 10
(3,028 Views)

thanks for all the replies....

looks like the tabbing order is the easiest option......

0 Kudos
Message 10 of 10
(3,008 Views)