Can somebody tell me how to delete the complete content of a PtMultiText. I
know how to delete a selection but I have some difficulties to get it done
for the complete content.
TIA,
Freddy
Can somebody tell me how to delete the complete content of a PtMultiText. I
know how to delete a selection but I have some difficulties to get it done
for the complete content.
TIA,
Freddy
Hey Freddy
This works for me
Some_Function ()
{
char *String;
int End = 0;
PtGetResource ( YOUR_MULTITEXT_WIDGET, Pt_ARG_TEXT_STRING, &String, 0);
End = strlen ( String );
PtMultiTextModifyText (YOUR_MULTITEXT_WIDGET, 0, End, 0, “”, 0, NULL,
0);
}
Thanks,
Rodney
“Freddy” <fmartens2000@planet.nl> wrote in message
news:ae9v3l$t4$1@inn.qnx.com…
Can somebody tell me how to delete the complete content of a PtMultiText.
I
know how to delete a selection but I have some difficulties to get it done
for the complete content.TIA,
Freddy
Thanks for making sure that I was on the right way. I was already walking to
this suggestion.
Thanks
“Rodney Dowdall” <guisupport@qnx.com> wrote in message
news:aeb41u$e7$1@nntp.qnx.com…
Hey Freddy
This works for me
Some_Function ()
{
char *String;
int End = 0;PtGetResource ( YOUR_MULTITEXT_WIDGET, Pt_ARG_TEXT_STRING, &String,
0);
End = strlen ( String );
PtMultiTextModifyText (YOUR_MULTITEXT_WIDGET, 0, End, 0, “”, 0, NULL,
0);
}Thanks,
Rodney“Freddy” <> fmartens2000@planet.nl> > wrote in message
news:ae9v3l$t4$> 1@inn.qnx.com> …
Can somebody tell me how to delete the complete content of a
PtMultiText.
I
know how to delete a selection but I have some difficulties to get it
done
for the complete content.TIA,
Freddy
\
Hey Freddy
There are a couple of things that are wrong with the suggestion that I
gave you. One of them is that strlen returns the number of bytes and
not the number of chracters, which is what PtMultiTextModifyText is
expecting. Not a really big deal but still might cause a problem. Also
the number of characters you pass to this function does not have to be
accurate. You could pass it INT_MAX and it would work because it will
select the range that you specify or the maximum number of characters in
the widget, whichever is the least.
So finally after having this pointed out by a couple of people, here is
a much simpler way to delete all of the text:
PtSetResource( widget, Pt_ARG_TEXT_STRING, “”, 0 );
I’m sorry that I mislead you.
Rodney
fmartens-2000 wrote:
Thanks for making sure that I was on the right way. I was already walking to
this suggestion.Thanks
“Rodney Dowdall” <> guisupport@qnx.com> > wrote in message
news:aeb41u$e7$> 1@nntp.qnx.com> …Hey Freddy
This works for me
Some_Function ()
{
char *String;
int End = 0;PtGetResource ( YOUR_MULTITEXT_WIDGET, Pt_ARG_TEXT_STRING, &String,
0);
End = strlen ( String );
PtMultiTextModifyText (YOUR_MULTITEXT_WIDGET, 0, End, 0, “”, 0, NULL,
0);
}Thanks,
Rodney“Freddy” <> fmartens2000@planet.nl> > wrote in message
news:ae9v3l$t4$> 1@inn.qnx.com> …Can somebody tell me how to delete the complete content of a
PtMultiText.
I
know how to delete a selection but I have some difficulties to get it
done
for the complete content.
TIA,
Freddy
\
Thanks, this is where I was looking for. Short and simple.
Freddy
“Rodney Dowdall” <guisupport@qnx.com> wrote in message
news:3D09D6A6.6010806@qnx.com…
Hey Freddy
There are a couple of things that are wrong with the suggestion that I
gave you. One of them is that strlen returns the number of bytes and
not the number of chracters, which is what PtMultiTextModifyText is
expecting. Not a really big deal but still might cause a problem. Also
the number of characters you pass to this function does not have to be
accurate. You could pass it INT_MAX and it would work because it will
select the range that you specify or the maximum number of characters in
the widget, whichever is the least.So finally after having this pointed out by a couple of people, here is
a much simpler way to delete all of the text:PtSetResource( widget, Pt_ARG_TEXT_STRING, “”, 0 );
I’m sorry that I mislead you.
Rodney
fmartens-2000 wrote:
Thanks for making sure that I was on the right way. I was already
walking to
this suggestion.Thanks
“Rodney Dowdall” <> guisupport@qnx.com> > wrote in message
news:aeb41u$e7$> 1@nntp.qnx.com> …Hey Freddy
This works for me
Some_Function ()
{
char *String;
int End = 0;PtGetResource ( YOUR_MULTITEXT_WIDGET, Pt_ARG_TEXT_STRING, &String,
0);
End = strlen ( String );
PtMultiTextModifyText (YOUR_MULTITEXT_WIDGET, 0, End, 0, “”, 0,
NULL,
0);
}Thanks,
Rodney“Freddy” <> fmartens2000@planet.nl> > wrote in message
news:ae9v3l$t4$> 1@inn.qnx.com> …Can somebody tell me how to delete the complete content of a
PtMultiText.
I
know how to delete a selection but I have some difficulties to get it
done
for the complete content.
TIA,
Freddy
\