Move a window with a drawing button?? 
Author Message
 Move a window with a drawing button??

Hi!

i've just started a new project, it's a remote control
for xawtv

i want to use a border (a gif graphic), and the border and the
menu of the windowmanager should be removed. a button on the
top schould be the the "moving"-button

if somebody know an example, how to make this...
please write a reply
--

+------------------+--------------------+
| Erwin Preuner    |                    |
|                  |     L I N U X      |
| Seilergasse 10   |                    |
| 4873 Frankenburg +--------------------|
| Internet     http://www.*-*-*.com/ |

| HANDY:             +43 676 / 629 1998 |
+---------------------------------------+



Thu, 09 May 2002 03:00:00 GMT  
 Move a window with a drawing button??

Quote:
> Hi!

> i've just started a new project, it's a remote control
> for xawtv

> i want to use a border (a gif graphic), and the border and the
> menu of the windowmanager should be removed. a button on the
> top schould be the the "moving"-button

> if somebody know an example, how to make this...
> please write a reply

Turn off all window manager decorations with "wm overrideredirect . 1". Then
do whatever you wish with the window.


Fri, 10 May 2002 03:00:00 GMT  
 Move a window with a drawing button??

Quote:

> Hi!

> i've just started a new project, it's a remote control
> for xawtv

> i want to use a border (a gif graphic), and the border and the
> menu of the windowmanager should be removed. a button on the
> top schould be the the "moving"-button

> if somebody know an example, how to make this...
> please write a reply
> --

Hi Erwin,

Here is an example.

-----------------------------------------
#!/usr/local/bin/wish8.2

wm overrideredirect . true
wm geometry . 100x100+0+0

button .move -text move
pack .move

bind .move <B1-Motion> {drag}

proc drag {} {

set X [winfo pointerx .]
set Y [winfo pointery .]

#This makes the move button stay under the cursor.
#This is not needed.  Try removing it for fun.

set Xpos [expr $X - 50]
set Ypos [expr $Y - 10]

#This is needed to position the window.  
#wm geometry . +$X+$Y
wm geometry . +$Xpos+$Ypos

Quote:
}

-------------------------------------

I suggest you get the Img extension to Tcl/Tk.  It makes life much more
enjoyable while working with graphics, because you can use a lot more
formats.  You could also try using a PNM image instead of a GIF with the
standard Tcl/Tk.  I am interested in helping with your project.  So, if
you could use some help, let me know.



Sun, 12 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Drawing Windows-like buttons with TASM

2. Move up/Move down buttons

3. Moving a draw

4. Moving the turtle without drawing

5. How to draw a window not hidden by the taskbar in windows

6. drawing in window, created by ms windows

7. FiveWin Owner Draw Button Problem

8. canvas drawing on button

9. Tkinter -- drawing small textual Buttons

10. Draw a button

11. Check and radio button entries not drawn correctly

12. Tk4.0 button-drawing bug

 

 
Powered by phpBB® Forum Software