For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > August 2004 > Dialog box and modality.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dialog box and modality.
Shive

2004-08-23, 3:59 pm

Sounds like a research paper.

Apparently there is no way, at least with my documentation, of making a
dialog box appear in a specific place. It would seem that they alway
center themselves on the screen.

So, making my own dialog box out of a standard frame I come up to the
problem of how to make the widget modal. In fact there is not even a
modal listing in the indexes of my books. Is the modal state called
something else in TK?

Anybody know?

Thanks
Shive
Ala Qumsieh

2004-08-23, 3:59 pm

Shive wrote:
> So, making my own dialog box out of a standard frame I come up to the
> problem of how to make the widget modal. In fact there is not even a
> modal listing in the indexes of my books. Is the modal state called
> something else in TK?


perldoc Tk::grab

--Ala
Marc Dashevsky

2004-08-23, 3:59 pm

In article <pan.2004.08.23.17.13.38.984536@none.com>, shive@none.com says...
> Sounds like a research paper.
>
> Apparently there is no way, at least with my documentation, of making a
> dialog box appear in a specific place. It would seem that they alway
> center themselves on the screen.


See if this works. If not, can you upgrade? Tk::DialogBox and
Tk::Dialog were improved at some point to accept Tk::Popup options.
See Tk::Popup pod if you can.

use Tk;
use Tk::Dialog;

my $mw = tkinit;
$mw->Dialog(-popanchor => 'nw', -overanchor => 'nw')->Show;
MainLoop;

--
Go to http://MarcDashevsky.com to send me e-mail.
krf

2004-08-24, 11:04 pm

Thanks to both of you. Those posts got me back in the game.

The *anchor options are interesting, even if I don't quite understand the
way they are working at the moment.

And I never even heard of "grab" but at least my book has.
Interesting...

Shive (on a compadres machine)



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com