Skip navigation.
Home
The QNX Community Portal

View topic - writing in PtText

Page 1 of 1

writing in PtText

PostPosted: Thu Nov 22, 2012 5:15 pm
by Pogoda
Hello! I'm new in qnx4 photon programming. Please tell, me, how I can read text from file to PtText widget in Aplication Builder Program?

Re: writing in PtText

PostPosted: Thu Nov 22, 2012 6:36 pm
by maschoen
Pogoda wrote:Hello! I'm new in qnx4 photon programming. Please tell, me, how I can read text from file to PtText widget in Aplication Builder Program?


Check the documentation for PtGetResource() and PtGetResources().

PtGetResource() is easier to use if you are just reading one resource.

From memory, I think this will work:

char *str_var;

PtGetResource(widget, PT_ARG_TEXT_STRING, &str_var, 0);

or if you know the name of the widget: ABW_widget_name instead of widget.