Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing programmatically created objects
Message
 
 
To
28/12/2005 14:28:12
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01081407
Message ID:
01081436
Views:
10
Have you tried something like a container.click
PROCEDURE ThisForm.ScrollBox.InnerContainer.Click
   WITH ThisForm.ScrollBox.InnerContainer
         .Visible= .F.
         MESSAGEBOX("This was Clicked: "+.Name)
* Identify the associated text name like TextBox...
         loTextName=STRTRAN(.Name,loContanerName,"TextBox")
         loTextName.Visible= .T.
         loTextName.Enabled= .T.
   ENDWITH 
... Reassign visibilities to container
>I have created a class where I am creating some text boxes and then a container over them. (This is to get around not being able to keep the textbox transparent selected) I want to click on the container and then make the textbox forecolor change. Problem is I do not know how to reference the container object.
>
>This class is a scrolling container class so the container or the text boxes are dynamic based on what has been scrolled.
>
>Any help would be greatly appreciated.
>The routine that is used is below:
>
>WITH THIS.ScrollBox.InnerContainer
>	FOR lncounter =1 TO lncounter STEP 1
>		lcObjName = "textbox" + SYS( 2015)
>		lcObjName2 = "container" + SYS( 2015)
>		*		.NEWOBJECT( m.lcObjName, "textbox")
>		.NEWOBJECT( m.lcObjName, "flufftxt","fluffy2")
>		.NEWOBJECT( m.lcObjName2, "container")
>		loTextBox = EVALUATE( "." + m.lcObjName)
>		loContainer = EVALUATE( "." + m.lcObjName2)
>		IF VARTYPE( m.loTextBox) = "O" AND !ISNULL( m.loTextBox )
>			IF VARTYPE( m.loContainer) = "O" AND !ISNULL( m.loContainer )
>				loTextBox.HEIGHT = 40
>				loTextBox.WIDTH = 418
>				loTextBox.TOP = 2
>				loTextBox.LEFT = 2
>				loContainer.HEIGHT = 40
>				loContainer.WIDTH = 418
>				loContainer.TOP = 2
>				loContainer.LEFT = 2
>				loTextBox.FONTNAME = 'Cotillion'
>				loTextBox.FONTSIZE = 18
>*				loTextBox.FORECOLOR = 16744448
>				loTextBox.DisabledForeColor = 16744448
>				loTextBox.VALUE = &lcDispValue
>				loTextBox.MOVE( m.lnX, m.lnY,418,40)
>				loContainer.MOVE( m.lnX, m.lnY,418,40)
>				loTextBox.VISIBLE = .T.
>				loTextBox.enabled = .f.
>				loContainer.zorder(0)
>				lnY = lnY+42
>			ENDIF
>		ENDIF
>		SKIP
>		LOOP
>	ENDFOR
>ENDWITH
>
>
Edgar L. Bolton, B.S. B.B.A.
Previous
Reply
Map
View

Click here to load this message in the networking platform