Charles,
On Nov 27, 2005, at 8:50 AM, Charles Yeomans wrote:
Define a subclass of EditField that implements the GotFocus event
handler as follows.
Sub GotFocus()
me.SelStart = 0
me.SelLength = Len(me.Text)
GotFocus
End Sub
You'll need to declare a new event GotFocus in the subclass to call
it in the code above, thus exposing a GotFocus event in subclasses
(like when you drop your EditField subclass on a window).
I understand how to subclass EditField and use my subclass to change
the behavior of edit fields that I add directly to a window, but what
about edit fields that are included as part of another class, like
the ListBox? I want the edit fields within a ListBox object to have
this behavior also. Is it possible to do this while by subclassing
EditField and yet also not duplicate code (once for the subclass,
once for edit fields that are included as part of other classes)?
For instance, if I create a subclass of EditField called MLEditField,
can I then create a subclass of ListBox called MLListBox and somehow
define that any edit fields within an MLListBox should use
MLEditField and not EditField?
Thanks,
Chuck Ross
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|