Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select text

Status
Not open for further replies.

1362000

Technical User
Jul 31, 2005
10
IR
hi
i want to write an activex "a textbox"
i want a property like "selstart" and "sellegth"
how can add that properties to my activex
or how can highlight text by code in activex
thanks
 
Control
Code:
Public Property Get SelText() as string
   seltext = textbox.seltext
end property

Public Property let SelStart(value as integer)
   textbox1.selstart = value
end property
Public Proptery let SelLen(value as integer)
textbox1.setlen = value
end property
Public Property SelectText(Start as integer,Length as integer)
textbox1.selstart = start
textbox1.sellength = lenght
end property

I think that should do it..

Rob
 
In other words, just expose the underlying properties of your "constituent control(s)" (that's what Microsoft calls them) as properties of your control.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top