Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizable Container Control
Message
From
24/07/1997 19:14:21
Renato De Giovanni
Via Fractal Information Systems
São Paulo, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00041015
Message ID:
00041565
Views:
35
>>When there's a container into a Form, isn't it possible to a user resize it at run time with the mouse? (such as he can do with the Form itself)

>Hi!
>
>I have work on your problem a little.
>I found a way to do what you need, but you
>have to finish this job by yourself.
>
>This code work for horizontal resizing of a container or
>any control where you put it. To resize verticaly or both
>at same time, you have some code to add!
>
>First, create a container(or other) class.
>Add 2 properties: fromleft and fromright
>
>Put this code in the MouseMove Event:
>
>
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>DO CASE
>  CASE nButton = 1
>    IF This.MousePointer=9
>      DO CASE
>        CASE nXCoord < This.Left
>          z=This.Left-nXCoord
>          This.Left=nXCoord
>          This.Width=This.Width+z
>        CASE nXCoord > This.Left and nXCoord > This.Left+This.Width
>          z=nXCoord-(This.Left+This.Width)
>          This.Width=This.Width+z
>        CASE nXCoord > This.Left and nXCoord < This.Left+This.Width and This.fromleft
>          z=nXCoord-This.Left
>          This.Left=nXCoord
>          This.Width=This.Width-z
>        CASE nXCoord > This.Left and nXCoord < This.Left+This.Width and This.fromright
>          This.Width=nXCoord-This.Left
>      ENDCASE
>    ENDIF
>  CASE nButton = 0
>    DO CASE
>      CASE nXCoord = This.Left
>        This.MousePointer = 9
>        This.fromleft=.t.
>        This.fromright=.f.
>      CASE nXCoord = This.Left+This.Width-1
>        This.MousePointer = 9
>        This.fromright=.t.
>        This.fromleft=.f.
>      OTHERWISE
>        This.MousePointer = 0
>        This.fromleft=.f.
>        This.fromright=.f.
>    ENDCASE
>ENDCASE
>
>
>HTH :)

Hello Gérald!

That was really kind of you!

I haven't tried it yet but I'm sure it'll do the job.
I arrived from work now and I also studied this issue there. I was convinced it would be possible to get a resizable Container and I was almost achieving it. But I was taking a more complicated way...

Your code is more simple, accurate and beautiful.

Merci beaucoup! :-)

Renato
Previous
Reply
Map
View

Click here to load this message in the networking platform