Information générale
Catégorie:
Codage, syntaxe et commandes
>>>Hi,
>>>
>>>I am wondering how others deal with the following situation. Here is how I do:
>>>
>>>I have a form where some customers need to see a row of controls (three labels and three textboxs). Other customer do not need to see or use them.
>>>I place these controls on the form and set the Visible of all to .T.
>>>At run time, when the form is initialized - based on some setting that calls for these controls not be be used - the code sets the property Visible of all controls to .F. Then, there is a LOOP through all controls and the TOP value is decreased by 26 (the space for these controls).
>>>This works. But I wonder how others would do it.
>>
>>In an application I'm working on, I've added a custom cShowIf property to the control classes. There's code that gets called from the form's Refresh that loops through all the controls, checks for a value in cShowIf and if present, evaluates it to set the control's Visible property. We don't move controls around when some are hidden, though.
>>
>>Tamar
>
>Do I understand correctly is that in your case when a control Visible is set to .F., there is just an empty space on the form?
Yes. This is a vertical market application and the users have a tremendous number of settings they can use to refine how things work. Those settings, among other things, determine whether certain controls appear or not.
These forms are mostly very full, so spaces here and there aren't a big deal.
Tamar
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement