Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox
Message
From
07/06/2005 05:39:05
 
 
To
07/06/2005 02:13:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018907
Message ID:
01020811
Views:
21
Hi Mohammed,
I haven't tested, just wrote but you can see it's very simple and it's better
if you build it in a visual class
Anyway I hope it's ok.
define class myTextCont as 'container'
       height = 20
       width  = 50  
       borderstyle = 0
	procedure init
   		this.AddObject('Mytxt','TextBox')
   		this.AddObject('MyLbl','Label')
   		this.MyLbl.left = 2
   		this.MyLbl.caption = 'Your Label Caption'
   		this.mylbl.autosize = .t.
   		this.mylbl.top = 2
		this.mylbl.refresh()
		this.MyTxt.top = 2
		this.Mytxt.value = 100
		
		this.mytxt.left  =  this.mylbl.width + this.mylbl.left + 2
		this.Width = this.mylbl.width + this.mytxt.left + 6
		this.mytxt.visible = .t.
		this.mylbl.visible = .t. 		
	EndProc 
	
	Procedure refresh
		this.Visible = this.mytxt.value > 0
	EndProc

EndDefine 			
>hi,
>thank you for reply,
>any full small example,
>b.regards
>m.qasem
>
>>you could built a class based on container in which you put a textbox and a label, than in its refresh you could write
>>this.visible = this.textbox.value > 0
>>so you have less code and less objects to manage
Previous
Reply
Map
View

Click here to load this message in the networking platform