annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

string control reset button (mac like)

Hi all,

 

Has anybody ever created a string input control that has an 'X' at the right corner to reset the values in the control. If yes, how to do? I do have plenty of filters for my data in my application and it would be sweet to have similar input reset button as with the most aple applications.

 

Thank u 🙂

0 Kudos
Messaggio 1 di 11
4.856Visualizzazioni

Hmm, an interesting idea.  Why couldn't you create a Cluster with two elements, String (a String, naturally) and Reset (a Latching Boolean).  I haven't tried making the appropriate Custom Control, but I can envision it ... .  I'm sure someone will give it a shot ... (maybe even I).

 

Bob Schor

0 Kudos
Messaggio 2 di 11
4.836Visualizzazioni

Hey, it works!  It was even easier than I thought it would be -- it's just a cluster, with some appropriate sizing and arranging the elements (Auto-sizing) horizontally.  I'm attaching the control -- feel free to play with it.  

Mac String.png

Bob Schor

0 Kudos
Messaggio 3 di 11
4.827Visualizzazioni

Cool! Thank you! 🙂

0 Kudos
Messaggio 4 di 11
4.801Visualizzazioni
Depending upon how ambitious you feel, this would also make an interesting XControl.

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
Messaggio 5 di 11
4.785Visualizzazioni
Well I have to admit that I have like no clue of xcontrols. How would that work?
0 Kudos
Messaggio 6 di 11
4.760Visualizzazioni

Have a look at this tutorial for XControls:

Creating New Front Panel Objects with LabVIEW XControls - National Instruments
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2jVCAQ&l=en-US

 

It explains it pretty nicely. There is also a LabVIEW Example that you can use as a starting point.

Refer to the Simple Dual Mode Thermometer XControl project in the labview\examples\Controls and Indicators\XControls\Dual Mode Thermometer directory.

Corinne Doppmann
Application Engineer
National Instruments
0 Kudos
Messaggio 7 di 11
4.744Visualizzazioni

Hi all,

Thanks for your input. At the same time you recommended to so solve this task with xcontrols, I attended the lv adavnced architecture training and xcontrols are part of it. here's the solution:

 

Thank you all!

0 Kudos
Messaggio 8 di 11
4.681Visualizzazioni

hi again,

 

the xcontrol I posted some time ago works like a charm, except the key focus. This seems to be an issue with any type of xcontrol that you cannot set the focus via the application anymore. I had the idea of a workaround to use methods, but I didn't got it to work. Any suggestions how to set the key focus of a xcontrol?

 

Thanks all!

0 Kudos
Messaggio 9 di 11
4.326Visualizzazioni

What have you tried? I would be very surprised if the application key focus property worked. My expectation would be that it would give focus to the XControl as a whole, not controls within it.

 

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
Messaggio 10 di 11
4.314Visualizzazioni