On Mar 27, 2007, at 19:28 UTC, Markus Winter wrote:

> I wanted to write a generic method to set the properties (like
> TextFont, TextSize, etc) of EditFields, StaticTexts, and Listboxes.

To do that, you'd need some superclass or interface that all those
control classes share, which define the stuff they have in common.  No
such interface exists, so you're pretty much out of luck (unless you
want to make a subclass of each of them that implements an interface
you define, and use only those subclasses in your window).

Alternatively, of course, since there are only a handful of these
classes anyway, you can just use an if/elseif structure testing whether
it IsA EditField, or IsA StaticText, or IsA Listbox, and then typecasts
and sets the properties accordingly.  That's what I would do.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to