Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Status Bar
Message
From
04/03/1998 12:56:08
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/03/1998 12:48:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00082532
Message ID:
00082537
Views:
24
>I would like to know if anyone can send me in the right direction on this matter:
>
>I would like to build a form that books out rooms. I would like for a time line to appear with 1/2 hour intervals and be able to click under it and click on start and end time and a vertiacl box will appear. once i have scheduled the event i would like to click on the right side of this new bar and expand the bar to increase the time alloted or make the line shorter. My problem lies in how to create a graphical object that can grow. A status indicator bar is bascially what i am envisioning that can be controlled by the mouse.
>
>Any help would be greatly appreciated. Thanks.
I think you're seeking for a sizeable shape. Try with this class :
**************************************************
*-- Class:        sizeable (c:\temp\test.vcx)
*-- ParentClass:  shape
*-- BaseClass:    shape
*
DEFINE CLASS sizeable AS shape


	Height = 116
	Width = 107
	threshhold = 3
	Name = "sizeable"
	inresize = .F.
	ldraglb = .F.
	ldragbb = .F.
	ldragtb = .F.
	ldragrb = .F.


	PROCEDURE MouseUp
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.inResize = .f.
	ENDPROC


	PROCEDURE MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.lDragLB = between(nXCoord,this.left-this.ThreshHold,this.left+this.ThreshHold)
		this.lDragTB = between(nYCoord,;
			this.top - this.ThreshHold, this.top+this.ThreshHold)
		this.lDragRB = between(nXCoord,;
			this.left+this.width-this.ThreshHold,this.left+this.width+this.ThreshHold)
		this.lDragBB = between(nYCoord, ;
			this.top+this.height-this.ThreshHold, this.top+this.height+this.ThreshHold)
		this.inResize = this.lDragLB or this.lDragTB or this.lDragRB or this.lDragBB
	ENDPROC


	PROCEDURE MouseMove
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		if this.inResize
			if this.lDragLB
				if nXCoord < this.left
					this.width 	= this.width + abs(this.left - nXCoord)
				else
					this.width 	= max(this.width - abs(this.left - nXCoord),0)
				endif
				this.left   = nXCoord
			endif
			if this.lDragTB
				if nYCoord < this.top
					this.height = this.height + abs(this.top - nYCoord)
				else
					this.height = max(this.height - abs(this.top - nYCoord),0)
				endif
				this.top	= nYCoord
			endif
			if this.lDragRB
				if nXCoord < this.left + this.width
					this.width 	= max(this.width - abs(this.left + this.width - nXCoord),0)
				else
					this.width 	= this.width + abs(this.left + this.width - nXCoord)
				endif
			endif
			if this.lDragBB
				if nYCoord < this.top + this.height
					this.height = max(this.height - abs(this.top + this.height - nYCoord),0)
				else
					this.height = this.height + abs(this.top + this.height - nYCoord)
				endif
			endif
		else
			this.lDragLB = between(nXCoord,this.left-this.ThreshHold,this.left+this.ThreshHold)
			this.lDragTB = between(nYCoord,;
				this.top - this.ThreshHold, this.top+this.ThreshHold)
			this.lDragRB = between(nXCoord,;
				this.left+this.width-this.ThreshHold,this.left+this.width+this.ThreshHold)
			this.lDragBB = between(nYCoord, ;
				this.top+this.height-this.ThreshHold, this.top+this.height+this.ThreshHold)
			do case
				case this.lDragLB and this.lDragTB ;
					or this.lDragRB and this.lDragBB
					this.mousepointer = 8
				case this.lDragLB and this.lDragBB ;
					or this.lDragRB and this.lDragTB
					this.mousepointer = 6
				case this.lDragRB or this.lDragLB
					this.mousepointer = 9
				case this.lDragTB or this.lDragBB
					this.mousepointer = 7
				otherwise
					this.mousepointer = 0
			endcase
		endif
	ENDPROC


ENDDEFINE
*
*-- EndDefine: sizeable
**************************************************
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform