Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New user needs help with pages/grids
Message
De
02/11/1998 17:23:53
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
02/11/1998 15:47:08
David Waters
Sir Arthur Lewis Community College
Castries, St Lucie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00150428
Message ID:
00153729
Vues:
38
Hi, David.

This is the code from my txtbtns class method SetAllProp the way it's evolved over the years. (I bolded the section that I think applies to what we were discussing.)

HTH
LPARAMETER oContainer

* Checks for General fields
LOCAL i,oControlParent

IF PCOUNT() = 0
	m.oControlParent = THIS.PARENT
ELSE
	m.oControlParent = m.oContainer
ENDIF

FOR i = 1 TO m.oControlParent.ControlCount
	DO CASE
	CASE ATC(m.oControlParent.Controls[m.i].BaseClass, line,shape,label,header,column,commandgroup,optiongroup" ) > 0
		LOOP

	CASE ATC(m.oControlParent.Controls[m.i].BaseClass,"Column,Spinner,EditBox,TextBox")>0
		m.oControlParent.Controls[m.i].ReadOnly = .NOT.THIS.EditMode

	<b>CASE ATC(m.oControlParent.Controls[m.i].BaseClass,"ComboBox,ListBox,OptionGroup,CheckBox") > 0
		IF this.EditMode
			m.oControlParent.Controls[m.i].EditMode = .T.
			m.oControlParent.Controls[m.i].resetToDefault( 'BackColor' )
			m.oControlParent.Controls[m.i].resetToDefault( 'ForeColor' )
		ELSE
			m.oControlParent.Controls[m.i].EditMode = .F.
			m.oControlParent.Controls[m.i].BackColor = ;
				m.oControlParent.Controls[m.i].DisabledBackColor 
			m.oControlParent.Controls[m.i].ForeColor = ;
				m.oControlParent.Controls[m.i].DisabledForeColor
		ENDIF</b>
	CASE ATC("Container",m.oControlParent.Controls[m.i].BaseClass) > 0
		THIS.SetAllProp(m.oControlParent.Controls[m.i])

	ENDCASE
ENDFOR
>nancy,
>ok, i've backed up my wiz class, i've created a new logical property called 'editmode' to the base combo class and so now i need to add code to the setall property of the txtbtns class method to check this new property, right? so i would just create an IF statement checking whether to see if this new editmode property is 'T' or 'F' and enable/disable the combobox accordingly?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform