You might be able to avoid the TitleBar mess by using a PlainBox window.

Make a new PlainBox window and add this to the Open event:
  Me.Left = 0
  Me.Top = 150
  Me.Width = 10
  
MouseEnter event:
  Me.Width = 150
  
MouseExit event:
  Me.Width = 10

This causes the window to appear flush left on the screen at 10 pixels wide.
Moving the mouse into this area of the window causes it to spring out at 150
pixels wide.  Moving the mouse out of the window area causes the window to
shrink back to 10 pixels wide.

Add this to the MouseDrag event:
  If System.MouseY < Me.Top + 10 then
    Me.Top = Me.Top + MouseY 
  End If

Add this to the MouseDown event:
  Return True

Now, if the mouse clicks and drags in an area that is less than ten pixels
from the top of the window, you can move the window up and down the left
side of the screen.

If you need the window to be more of a pallet, you should be able to set the
position left side of the window based on mouse drags as well.

The downside to this sort of thing is the lack of native system appearance.
The example above is simple and could be improved.  It might be a decent
start.


If what you're really looking for is a WindowShade-style pallet window, see
my example here:
http://www.mabenterprises.com/realbasic/rbdownloads/WindowShade_RollUp_1.0.r
b

This rollup/WindowShade example uses a Floating window, so the TitleBar is
native to the OS.  It does *not* use declares to determine TitleBar height,
so there could possibly be problems on some systems.  It seems to work well
on standard systems.

If anyone knows the declares to determine TitleBar height, I would really
appreciate seeing the code.

HTH




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to