Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - getting data from textbox: (5 Items)
   
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..
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
Re: AW: getting data from textbox  
i want to retrieve the text entered by the user into the text box.
can u suggest me any other method to do the same?
Re: AW: getting data from textbox  
ive tried to use printf as well.the program gets terminated on its own
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