Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing Controls
Message
From
07/07/1999 14:48:13
 
 
To
29/06/1999 01:27:35
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00232807
Message ID:
00238446
Views:
23
>>>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
>
Hi Cetin,

What I ended up doing was scrapping the edit box and using a label instead.  
The problems of trying to dynamically resize the editbox far outweighed any benefit of using the editbox control.  With the label control, your code works with little change.

Thanks again,

Jim Edgar
>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
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform