Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still have these gaps in understanding
Message
De
22/04/2002 16:03:39
 
 
À
22/04/2002 15:06:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00631499
Message ID:
00647845
Vues:
19
Craig,

Thanks for the suggestion. I'm not sure, however, how I would do this for controls such as command buttons, option groups, since, I noticed, they don't have a read only property. Also, in my testing, for example, a checkbox behaved strangely when I set the readonly property to .t.. It looked enabled, but upon clicking it, it went grey.

I was hoping to have look and feel for all controls in the 'view state' that was different than the edit state, but not quite as 'disabled looking' as when the controls are disabled, since the values can be hard to read in that state. I was thinking of setting/changing either the backcolor or forecolor.

Also, another interface question. In Accountmete the enabled property is set in the control's refresh method, not the init. If these things are coded in the init, then they can't be changed once the form is instantiated, true? But maybe that is the way it should be? In Accountmate's case, instead of having an 'open' button, they have a 'key lookup' control. The form loads with the focus in the key lookup control. This control is the only enabled one, all others are disabled. After returning from the lookup, the editmode is switched to true, and the refresh of each control fires (after a thisform.refresh() - I think).

I don't like Accountmate's method. I would much rather see a modal form 'open dialog box' popup, upon clicking an open button, rather than having a lookup control embedded in the form - Accountmate doesn't have an open button.

My intention is to have the form open up, initially in a state where the editmode is false, and all the controls are disabled (except the toolbar), and then only upon clicking new, or returning from the open dialog box, after clicking open, would the controls become enabled.

Would this methodology conform to Windows UI guidelines?


Any suggestions?



>IMO, a better way is to set the control's ReadOnly property to .T. This will give the control a disabled look. You could have the Init of the control check the security setting for the user and then set the ReadOnly property accordingly.
>
>>My intention would be to then have my control classes setup such that if the user chose a read only mode (or were forced to based upon their security setup) that a false would be returned from the control's when, or the enabled property would be set to false.
>>
>>I am looking for suggestions on whether I should and/or how to implement this, and I am also wondering whether it would be a good solution for the original poster?
>>
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform