Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug or design 'feature'?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Bug or design 'feature'?
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01035268
Message ID:
01035268
Vues:
59
UPDATE. Disregard. Refresh after this setting makes them behave.


Hi everybody,

I want to set my drop down combobox to be readonly. I can not use enabled property, because it's used by security module. Setting ReadOnly property to true for drop down combo has no effect, unfortunately. This is by design, but it causes me a lot of grief.

Well, since I need the ReadOnly to work, I also change Style, so I'm using:
*---------------------- Location Section ------------------------
*   Library: 	Aformspatientdemo.vcx
*   Class: 		Cntguarantor
*   Method: 	SetguarantorControls()
*----------------------- Usage Section --------------------------
*)  Description:
*)

*   Scope:      Public
*   Parameters:
*$  Usage:
*$
*   Returns:
*--------------------- Maintenance Section ----------------------
*   Change Log:
*       CREATED 	07/14/2005 - WGB
*		MODIFIED
*----------------------------------------------------------------
LPARAMETERS tlEnabled

WITH THIS
	* Setting ReadOnly for drop down combos has no effect due to VFP combobox design
	.SETALL('style',IIF(m.tlEnabled,2,0),'cboViscodes')
	.SETALL('style',IIF(m.tlEnabled,2,0),'cboStates')
	.SETALL('style',IIF(m.tlEnabled,2,0),'cboCountry')
	
	
	.SETALL('ReadOnly',!m.tlEnabled)

ENDWITH
But now I'm facing another side effect. When I do it the first time, everything is fine. But then I do it again in my button's code, all combos appear without value. When you set focus to them, the value miracously re-appears. The combos have bound property set to true and have array as their record source. If I flip the bound property, the combos appear with values, but now my form thinks, something was changed.

So, how can I make these combos behave?

Thanks a lot in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform