Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

wm overrideredirect


Hi

When using

wm overrideredirect . yes

bind actions seems not to work. Anyway if I bind them to '.', the frame
generated in '.' or to 'all'. If using window decorations by commenting
out the above line, bind actions work fine.

Is there a way to make them work in the case without window decorations
as well?

Thanks in advance,
David

David Andel wrote:
> Hi

> When using

> wm overrideredirect . yes

> bind actions seems not to work. Anyway if I bind them to '.', the frame
> generated in '.' or to 'all'. If using window decorations by commenting
> out the above line, bind actions work fine.

> Is there a way to make them work in the case without window decorations
> as well?

David

I can only post some code that I have that works (under Linux) and you can
see where yours differs in implementation.

This code is supposed to give an icon button at top left of screen and it
has context menu attached.

HTH

     Rob.

---------------------------------------------------------------------
#!/bin/sh
# \
exec wish "$0" ${1+"$@"}

package require Img

wm overrideredirect . 1

set imgfile "/usr/share/icons/favicons/skype.png"
image create photo img -file $imgfile

set fraBorderWidth 2
frame .f -borderwidth $fraBorderWidth
set frameDefaultColour [.f cget -background]
pack .f
button .f.b -image img -relief raised -borderwidth 4
pack .f.b

set contextMenu [menu .popmenu -tearoff 0]
$contextMenu add command -label "Quit" -accelerator "Alt+F4" -command {exit}
$contextMenu add separator
$contextMenu add command -label "Properties..." -command {}

bind .f.b <ButtonRelease-3> {tk_popup .popmenu [winfo pointerx .] [winfo
pointery .]}
bind . <Enter> {.f configure -bg red}
bind . <Leave> {.f configure -bg $frameDefaultColour}
bind . <Unmap> {wm deiconify .
                focus -force}
---------------------------------------------------------------------

They should work. Is this problem with key bindings or mouse bindings?

If it's with key bindings, have you considered the possibility that the
window on which you place key bindings may not have focus? You might
need to add a binding that forces focus on a mouse click.

--
Bryan Oakley
http://www.tclscripting.com

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc