Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't SelStart work?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Why doesn't SelStart work?
Miscellaneous
Thread ID:
00125098
Message ID:
00125098
Views:
64
I have a textbox field on a form.

At the bottom of the form, I have a push button to a foreign character listbox on another form. Whilst editing the textbox field, I want to return a selected foreign character back from the listbox/form, and insert it into the textbox at the position I was last when I hit the push button.

This is my code in the push button's click event -

LOCAL cChar
cChar = ""
nSelStart = THISFORM.txtAddress.SelStart
DO FORM eForeign TO cChar

WITH THISFORM.txtAddress
IF !EMPTY(cChar)
.Value = STUFF(.Value,.SelStart + 1,0,cChar)
.Refresh()
ENDIF
.SetFocus()
ENDWITH

Unfortunately, it doesn't work. Mainly because "nSelStart" always is returned as zero - I checked it out through the debugger.

Can anyone please provide a solution. I have searched the "thread" without success.

Thanx in anticipation.

Rex Toomey
Australia.
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Next
Reply
Map
View

Click here to load this message in the networking platform