Thomas Haupt
|
AW: getting data from textbox
|
Thomas Haupt
04/10/2011 3:11 AM
post84847
|
AW: getting data from textbox
I'm not entirely sure, but I believe your problem may not be the PtSetArg, but instead the PtMultiTextModifyText. You
provide the values start=-1, end=12, and insert=-1. Since start!=end, insert would be ignored and the text from position
(start) to position (end) be replaced by the given text. In that operation, start==-1 could cause a failure.
What exactly are you trying to achieve with these argument values? Do you want to delete the MultiBox's first twelve
characters and append your text to the end? That will take two calls, one for deleting and one for insertion.
You could also try to printf() the value of (text) and see if PtSetArg / PtGetResource really didn't work...
Cheers,
Thomas
----- Originalnachricht -----
Von: riddhi raiker [mailto:community-noreply@qnx.com]
Gesendet: Sunday, April 10, 2011 12:59 AM
An: photon-graphics <post84846@community.qnx.com>
Betreff: getting data from textbox
i i was trying to retrieve data from the textbox using the following code.
PtArg_t arg[1];
char *text;
PtSetArg ( &arg[0], Pt_ARG_TEXT_STRING, &text, 0);
PtGetResources (ABW_PtText1,1,arg);
PtMultiTextModifyText(ABW_PtMultiText1,-1,12,-1,text,12,NULL,NULL);
but the PtSetArg() function doesnt seem to work.
Please help me with this problem..
_______________________________________________
Photon microGUI
http://community.qnx.com/sf/go/post84846
|
|
|
Derek Leach
|
RE: getting data from textbox
|
Derek Leach
04/11/2011 9:27 AM
post84859
|
RE: getting data from textbox
Are you sure you are targeting the correct text box in your application?
-----Original Message-----
From: riddhi raiker [mailto:community-noreply@qnx.com]
Sent: April 10, 2011 1:00 AM
To: photon-graphics
Subject: getting data from textbox
i i was trying to retrieve data from the textbox using the following
code.
PtArg_t arg[1];
char *text;
PtSetArg ( &arg[0], Pt_ARG_TEXT_STRING, &text, 0);
PtGetResources (ABW_PtText1,1,arg);
PtMultiTextModifyText(ABW_PtMultiText1,-1,12,-1,text,12,NULL,NULL);
but the PtSetArg() function doesnt seem to work.
Please help me with this problem..
_______________________________________________
Photon microGUI
http://community.qnx.com/sf/go/post84846
|
|
|