Skip navigation.
Home
The QNX Community Portal

View topic - How to use Text String to give the value to any variable

How to use Text String to give the value to any variable

Isn't the name clear?

How to use Text String to give the value to any variable

Postby bzxaggio » Sun Oct 10, 2010 5:57 pm

In order to develop a GUI interface for a vehicle, so need to set its initial velocity through the control panel--the interface. Question is how to use PtText and PtButton to achieve it like input a number 10 and click the button to give this number to a variable "velocity" to set the maximum velocity of the vehicle, anyone have suggestions or examples about PtText? Thank you!

PS: The attachment is an example layout of the control panel.
Attachments
eg.png
(1 KiB) Downloaded 23 times
bzxaggio
Active Member
 
Posts: 16
Joined: Tue Aug 24, 2010 10:09 pm
Location: CHI

RE: How to use Text String to give the value to any variable

Postby maschoen » Tue Oct 12, 2010 1:30 am

If you want to set the value, you want to use either PtSetResource or PtSetResources. If you want to get the value, it's PtGetResource or PtGetResources. If you want to be informed when the value is changed or someone hits a button, look at the callbacks for PtText. You can set the callback in PhAB or programmatically.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest