Combo Box Detection
Doug Cottrill (7/2/08 5:48PM)
Paul Mohammadi (7/3/08 12:14AM)
Doug Cottrill (7/2/08 5:48 PM)
Sorry, I've been coding listboxes a lot lately and misread what you
had typed. I
don't have an answer for you other than I doubt there is an easy way.
DKC
Actually, I was referring to a "combo box" not a listbox. Maybe I
am using the wrong name. This is the type of object that can be
typed into as well as having a drop down menu of sorts that can be
used to select the text that will eventually end up in the typing
area. It looks like a regular variable or field with a button on
the right end of the object.
I do examine the form's objects and as I run through the array of
pointers, I can determine the type of object of most, but when it
comes to these, I could easily mistake a normal "pop-up/drop down
list" for a "combo box" since both will return text array using the
Type call (if each object represented a text array).
I was trying to avoid hard coding for each of these objects on every
form. I do that now, and it is just another step I would like to
avoid every time I create a form that incorporates one of these. I
was hoping that there was a command that I was not using that
returned a unique ID that represented all of the available form
object types.
--
Doug Cottrill
PTM Software, LLC
Paul Mohammadi (7/3/08 12:14 AM)
<948eda980807022114w1c9392cet16352dd9797b5467@...
Eric,
If you are using 2004 and newer, you can use GET FORM OBJECTS to get a
list of object names and corresponding variable Pointers.
So if you use a naming convention for Combo boxes, you can simply
determine if the object is a Combo Box by looking up its object name.
Another method could also be to embed this information in the array
name itself. Sadly 4D has denied us the ability to determine just
what form objects we're dealing with using a simple command > 20
years and counting!
There might be plugins out there that can do this, I am however not
familiar with them.
HTH
Paul
Reply to this message
Summary created 7/3/08 at 2:06AM by Intellex Corporation
Comments welcome at: feedback@intellexcorp.com