in reply to stay-on-top property for Toplevel for Perl-Tk GUI
$top->bind("<Visibility>" => sub { $top->raise });
use strict; use Tk; use Win32::API; my $mw = new MainWindow; use vars qw/$Button/; $mw->Frame(-width=>200, height =>25); $mw->update; Win32::API->new("user32","SetWindowPos",[qw(N N N N N N N)],'N')->Call(hex($mw->frame()),-1,0,0,0,0,3); $Button=$mw->Button(-text => "Button", -command => sub { &do_something; }) ->pack(); MainLoop; sub do_something { #sleep(10); }
I think the _NET_WM_* stuff is also GNOME-compliant.my($wrapper) = $w->toplevel->wrapper; $w->property('set', '_NET_WM_STATE', "ATOM", 32, ["_NET_WM_STATE_STAYS_ON_TOP"], $wrapper);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: stay-on-top property for Toplevel for Perl-Tk GUI
by Courage (Parson) on Oct 15, 2002 at 14:25 UTC |