RubberBand TextBox 
Author Message
 RubberBand TextBox

Hi!

I want to create {*filter*}Band ListBoxes in my application like in the Visual-
DesignMode. What I did:

1. I loaded eight black squarish Labels around the TextBox.
        Label().DragMode=Manual

2. In the Label.MouseDown event I saved the MousePointerCoords (in
   globals). relative to the form.

3. I placed a Rectangel-Shape with the TextBox's X,Y,W,H on the form

4. I disable all controls on the form to get the MouseMove- and DragOver-
   Events to the form.

5. In Form.DragOver I resized the RectangleShape.

6. In Form_DragDrop I hide the Shape and set the new TextBox.Properties
   (x,y,w,h).

(!!!) MY PROBLEM:
The rectangle and the label disappear under the form's controls though I  
put them via ZOrder to the top.

What can I do to workaround this problem. (I don't want to change the  
TextBox's  size directly. That looks horrible on slow machines.)
How do the other Windows-Application solve this problem? Are there API-
Calls which can help me?

I hope somebody can help me.

Thank you in advance!

Bye
Andre

PS: You may correct my english! May be I can improve it ...

## CrossPoint v3.02 ##



Sat, 19 Jul 1997 19:43:00 GMT  
 RubberBand TextBox

AA>  (!!!) MY PROBLEM:
AA>  The rectangle and the label disappear under the form's controls
AA>  though I  
AA>  put them via ZOrder to the top.
AA>  
The problem is that ZOrder is only moving them to the top in their own
layers. There are 3 layers with your rectangle in the back layer and you
label in the middle layer. The top layer is where controls live. There is
no way I know of (somebody else might though) to get a back or middle
layer item to overlap a top layer item.

I ran into exactly this problem when I tried to use a label to create
tooltips for controls. The label kept getting overlapped by other controls
close enough to it. I ended up using a picture box and now it works fine.


~~~
 * VbReader 2.22 #516 *



Tue, 22 Jul 1997 12:29:00 GMT  
 RubberBand TextBox
X-Newsreader: WinVN 0.91.4


(Alan Popow) says:

Quote:


>AA>  (!!!) MY PROBLEM:
>AA>  The rectangle and the label disappear under the form's controls
>AA>  though I  
>AA>  put them via ZOrder to the top.
>AA>  
>The problem is that ZOrder is only moving them to the top in their own
>layers. There are 3 layers with your rectangle in the back layer and you
>label in the middle layer. The top layer is where controls live. There
is
>no way I know of (somebody else might though) to get a back or middle
>layer item to overlap a top layer item.

>I ran into exactly this problem when I tried to use a label to create
>tooltips for controls. The label kept getting overlapped by other
controls
>close enough to it. I ended up using a picture box and now it works

fine.
Arrgghh!. Picture boxes!. Much cheaper to use a 3d panel if you only want
to put text up. Picture boxes are very,very expensive objects - even one
of them eats up a significant chunk of Windows resources.

Of course, plan C is to draw directly on the form; if ClipControls is set
to false then you can draw all over controls; just make sure they refresh
first - the trick is to call UpdateWindow in the form paint event for
each child control, then you can draw all over their client areas. Who
needs layers!.



Sat, 26 Jul 1997 13:02:35 GMT  
 RubberBand TextBox

Quote:

>Date: 31 Jan 1995 12:43:00 +0100

>Subject: [Q] {*filter*}Band TextBox
>Hi!
>I want to create {*filter*}Band ListBoxes in my application like in the Visual-
>DesignMode. What I did:
>1. I loaded eight black squarish Labels around the TextBox.
>        Label().DragMode=Manual
>2. In the Label.MouseDown event I saved the MousePointerCoords (in
>   globals). relative to the form.
>3. I placed a Rectangel-Shape with the TextBox's X,Y,W,H on the form
>4. I disable all controls on the form to get the MouseMove- and DragOver-
>   Events to the form.
>5. In Form.DragOver I resized the RectangleShape.
>6. In Form_DragDrop I hide the Shape and set the new TextBox.Properties
>   (x,y,w,h).
>(!!!) MY PROBLEM:
>The rectangle and the label disappear under the form's controls though I  
>put them via ZOrder to the top.
>What can I do to workaround this problem. (I don't want to change the  
>TextBox's  size directly. That looks horrible on slow machines.)
>How do the other Windows-Application solve this problem? Are there API-
>Calls which can help me?
>I hope somebody can help me.
>Thank you in advance!

Hi Andre

The labels, being in a different graphical layer will always disappear under
a textbox. You might
1. Put the label on a picture or panel control which will cover the text box.
2. Use a panel rather than a label.
3. Use Microhelp's stretch control which has sizing handles, etc.

------------------------------------------------------------------------
Chuck Stuart
Mesquite TX USA
Contract Programmer.
Author of VBTrace, runtime VB Trace/Profile/XRef utility.
------------------------------------------------------------------------



Sat, 19 Jul 1997 19:04:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. RubberBand TextBox

2. Rubberband Arc or Rubberband Curve

3. RubberBand UserControls

4. Rubberband Line

5. Rubberband Rectangle in ACCESS-Form via WinApi

6. Drawing rubberband OVER controls

7. Rubberband Line with ScrollBar

8. ?! Rubberband always at the background ?!

9. Assigning value to textbox if textbox is a variable name

10. Userform: populate textbox with date from another textbox

11. object is not valid for type textbox and type textbox

12. datagrids and textboxes - rowchanges reflected in textbox

 

 
Powered by phpBB® Forum Software