in reply to Tk geometry function call

$Main->geometry(?\+300,\+300?);

The question marks are like / marks except that the pattern only matches once until you call reset;

You will have to quote them or escape them to make it happy.

Replies are listed 'Best First'.
Re: Re: Tk geometry function call
by TStanley (Canon) on Aug 09, 2001 at 03:12 UTC
    I tried this:
    $Main->geometry(\?\+300,\+300\?);
    However, this is what's returned to me:
    search pattern not terminated at GUI.pl line 18
    And when I put it in double quotes like this:
    $Main->geometry("?+300,+300?");
    I get this error:
    bad geometry specifier "?+300,+300?" at C:/Perl/site/lib/Tk/Submethod. +pm line 37

    TStanley
    --------
    There's an infinite number of monkeys outside who want to talk to us
    about this script for Hamlet they've worked out
    -- Douglas Adams/Hitchhiker's Guide to the Galaxy
      What are all these question marks? This is not the format for a geometry in Tk. They usually look something like these:
      $widget->geometry('640x480'); # Big as a VGA Screen $widget->geometry('+100+200'); # Slightly down to the right $widget->geometry('600x800+50+50'); # Big, out of corner
      And other variations. "perldoc Tk::Wm" for more details and options.