i’m new to QNX and the PhAB. I went through all the tutorials in the
QNX help and i have some basics in C. Now i am trying to create a GUI to remotly controll a robot. As you might have figured i am experiencing a couple problems .
I am am trying to insert text (via code) in a PtMultiText widget with
PtTextModifyText. The problem is, i don’t see any text in the textfield.
I based my code on the example given in the QNX help (i assume i declared all variables correctly):
PtSetArg( &args[nargs++], Pt_ARG_DIM, &dim, 0 );
mtext = PtCreateWidget( PtMultiText, NULL, nargs, args );
PtTextModifyText( mtext, NULL, NULL, 0, “Servereply: \n”, 8 );
PtMultiTextModifyText(mtext, NULL, NULL, -1, serverreply.messagetext,
strlen (serverreply.messagetext), &attr,
PtRealizeWidget( window );
I tried to modify the code in more than a few ways, always with the same
result —> no visible text.
PtSetResources (ABW_multi_display, 1, args);
i don’t even see a widgt in my application.
Inserting text in the PtMultiText widget with Pt_ARG_TEXT_STRING works fine by the way. But since i need line breaks, i guess i need to use
Hopefully someone could help me out, or maybe even post a simple example on how to insert lines without deleting any lines that were already in the textfield.
I tried to do it with the QNX help, but i don’t seem to get it done…
Thanks in advance.