LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cursor position in richtext control

In my project I have included a richtext control and a command button (named RF) .I want that after pressing the RF button
the richtext 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.
GetObjHandleFromActiveXCtrl(panelHandle, PANEL_RICHTEXTBOX, &gObjHandle);
  RichTextLib_IRichTextSetText (gObjHandle, NULL,"RF    ");
  SetActiveCtrl (panelHandle, PANEL_RICHTEXTBOX);
The result is "RF    " display in that richtext 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
(2,934 Views)
Try RichTextLib_IRichTextSetSelRTF. Also check out the AddLineCB command button callback function in the example program in samples/userint/activex/richTextbox.
 
Hope this helps.
 
- jared
0 Kudos
Message 2 of 3
(2,924 Views)
Thanks jared .Now It is working fine.
 
0 Kudos
Message 3 of 3
(2,899 Views)