Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box
Message
From
07/08/2001 16:56:10
 
 
To
07/08/2001 16:45:50
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00540953
Message ID:
00540970
Views:
25
Hi,

Thanks for the reply.


>
>First: are you using createobject()? You should be using form.NewObject() or form.AddObject() for this, or you won't get a combobox that you can see.
>
oops! I meant to say I used the addobject() function.

>As to custom IAC code at runtime. No can do.
>Code can only be created at design time.
>However, with VFP6 sp3 and up you can create a class for it and COMPILE at run time. You can create the IAC code this way.

Thats too bad as I am using vfp 5. Is there another way I can tell if the user changed the value in one of the dynamically created combo boxes? Basically, whenever the user selects a value I have to search through a table and take out any illegal values in the textbox below it.

Thanks,
Chris

>e.g.,
#Define CR Chr(13)
>lcCode = "Define Class myCombo1 As combobox"+CR
>lcCode = lcCode + " Procedure InteractiveChange"+CR
>lcCode = lcCode + "   Wait Window this.value" +CR && here's where the custom stuff goes
>lcCode = lcCode + " EndProc" +CR
>lcCode = lcCode + "EndDefine"+CR
>lcFile = "comboclass1.prg"
>StrToFile(lcCode, lcFile)
>Compile (lcFile)
>thisform.NewObject("cboOne", "mycombo1", "comboclass1.prg")
>With thisform.cboOne
>     .top = 10    && or wherever
>     .left = 10   && or wherever
>     .RowSourceType = 1
>     .RowSource = "one,two,three"
>     .visible = .T.
>EndWith
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform