Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizable Container Control
Message
 
To
21/07/1997 18:42:34
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:
00041421
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)
>
>TIA
>
>Renato

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 :)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform