Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing Controls
Message
From
29/06/1999 01:27:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
28/06/1999 16:58:20
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00232807
Message ID:
00235099
Views:
28
>>Hi James,
>>This is not specifically for an editbox but you could implement it
>--snip--
>
>Hi Cetin,
>
>You always write such clear code that it's quite easy to follow. Thank you for sharing it with me.
>
>Actually, I have tried something similar. The problem that arises with an editbox (and presumably other controls that have a .value property) is that a .mousedown on the control invokes focus. With the editbox specifically, this prevents .mousemove from firing while the left mousebutton is depressed (nButton = 1), so that the structure you suggest would not work. Actually it is a little more complex. If the left mousebutton is depressed and the mouse moved over the control, .mousemove does not fire. But if another button is initially depressed, the the user switches to the left button, mousemove will fire. Crazy!
>
>I'm looking a tricking the control in mousemove into thinking mousedown was pressed. I'll see how this works.
>
>Thanks again for your reply,
>
>regards,
James,
I tried a combination of shape class with Chad's suggestion and worked well. Placed the sizable shape control in front of editbox with same left, top, height, width then changed mousemove code to :
dodefault(nButton, nShift, nXCoord, nYCoord)
if nButton = 1
with ThisForm.Edit1 && Whatever the edit control is
	.left = this.left
	.top = this.top
	.height = this.height
	.width = this.width
endwith	
endif

* Click
ThisForm.Edit1.SetFocus
Code could be enhanced to make mouse events work directly for editbox when it has focus and it could again set itself zorder(1) on lostfocus or alike.
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