LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

regarding string control


In my project I have included a string control and a command
button (named RF) .I want that after pressing the RF button
the string should display "RF    " and the cursor should be
after this display.For doing this I have included the
following steps in callback function of the RF button.
SetActiveCtrl (panelHandle, PANEL_STRING);
SetCtrlVal (panelHandle, PANEL_STRING, "RF    ");
The result is "RF    " display in that string control but
the cursor position is before the "RF   " display .I want to
display the cursor after the "RF   " display.
Please help.
0 Kudos
Message 1 of 3
(3,098 Views)
I would add
SetCtrlAttribute (panel, PANEL_STRING, ATTR_TEXT_SELECTION_START, strlen("RF    "));
Hope you like it, Guenter
0 Kudos
Message 2 of 3
(3,085 Views)

Thank u.What should I do for richtextctrl ?I have included the following lines.

  GetObjHandleFromActiveXCtrl(panelHandle, PANEL_RICHTEXTBOX, &gObjHandle);
  RichTextLib_IRichTextSetText (gObjHandle, NULL,"RF    ");
  SetActiveCtrl (panelHandle, PANEL_RICHTEXTBOX);

0 Kudos
Message 3 of 3
(3,079 Views)