Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - tutorial give variable to widget: (2 Items)
   
tutorial give variable to widget  
good afternoon all.. I have a problem

i want to give variable to 3 multi text widget, so if I type  "15","20" and "30" on it, then it will become variable for
 equation: 

x=id1+(im1/60)+(is1/3600);

can you tell me how to do it?

sorry for my bad english and Thank you ..
Re: tutorial give variable to widget  
Hi Afif,
You can get a string from your widget and convert it to integer type with PtGetResource().
E.g.
PtGetResource(ABW_my_widget, Pt_ARG_TEXT_STRING, &my_string, 0);
my_int = atoi(my_string);

Also, if you need only integers, you can use PtNumericInteger.

Best regards,
Fedor