>Do you have sample code on how to use these properties?
>
>Thanks
>
>Bob
I forgot to mention an important function, at() (indicate at what position the substring is located).
I improvised the following sample.
Create a form, place an EditBox called EdbSample on it.
Add a button to the form; in the Click() Event, place the following code:
local lcWord, lnPosition
lcWord = "some"
with ThisForm.EdbSample
.Value = "This is some text" + chr(13) + chr(10) + "Line 2"
lnPosition = at(lcWord, .Value)
if lnPosition > 0
.SelStart = lnPosition - 1
.SelLength = len(lcWord)
endif
.SetFocus()
endwith
A real textbox will - in many cases - be bound (through its .ControlSource) to a memo field, but the code should probably still work.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)