Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Putting a Combobox in a grid
Message
From
22/07/2000 17:18:17
 
 
To
22/07/2000 17:10:52
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00395897
Message ID:
00395903
Views:
10
>If I just addobject('myobjectname', 'classname') and change currentcontrol to myobjectname, shouldn't I :
>
>1. be able to do that, and.......

You can, but if you don't set any properties for the ComboBox to tell it at least the RowSource and RowSourceType, specify that the Sparse property is true, define the columns properly, it will not do anything. Dropping a control that requires configuration in a column doesn't do anything for you.

>2. get a standard form of whatever classname I entered in addobject?
>

Yep, you can drop an instance of any object class, either a VFP basclass or one from your own class libraries, in there, but it won't configure it. It doesn't know what behaviors to use, or any of the things that would require non-default values to be set. IOW, AddObject() places the control there, but doesn't tell it how to act. You still have to do that.

>
>
>>>How do you replace the textbox control with a combobox control for the column of a grid?
>>>
>>
>>Use the Column's AddObject() method to add an instance of a ComboBox control, set the properties of the ComboBox, and then set the Column's CurrentControl property to select the ComboBox control you've added.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform