Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception enabled text
Message
 
 
To
02/03/2006 03:58:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01099405
Message ID:
01100845
Views:
16
Should be combobox instead of combo. Also use .F. instead of !.T. for readability.

>hi,
>
>thank you,
>combo not work
>
>ThisForm.SetAll("visible", !.t., "combo")....not ok
>
>ThisForm.SetAll("visible", !.t., "textbox") ...ok
>ThisForm.SetAll("visible", !.t., "label")....ok
>ThisForm.SetAll("visible", !.t., "line").....ok
>
>>>ThisForm.SetAll("visible", !.t., "textbox" + "combo") OR
>>
>>This would set the visible for all "textboxcombo" controls in the container. Unless you've defined one, there is no such control
>>
>ThisForm.SetAll("visible", !.t., "textbox" AND "combo")
>>>
>>AND performs a logical (boolean) comparison. You are trying to perform a boolean operation on character arguements. This will result in a "Function arguement, type, or count is invalid" error.
>>
>>
>>
>>From VFP8 help (it might have changed in VFP9)
>>Container.SetAll(cProperty, Value [, cClass])
>>Use the SetAll method to set a property for all, or a certain class of, controls in a Container
>>
>>There is no option to have a list of controls.
>>
>>>ThisForm.SetAll("visible", !.t., "textbox" , "combo")
gives an error about the number of arguements
>>
>>>ThisForm.SetAll("visible", !.t., "textbox,combo")
does nothing since there is no "textboax,combo" control
>>>
>>
>>You can either have ALL controls made invisible
>>
>ThisForm.SetAll("visible", !.t.)
or use a separate line for each class of controls
>>
ThisForm.SetAll("visible", !.t., "textbox")
>>ThisForm.SetAll("visible", !.t., "combo")
>>
>>I would also recommend using .F. for false rather than !.T. I think it's easier to read and understand, but that's a personal preference unrelated to your real questions here
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform