I can answer one of your questions Jeremy. You can set the checkmark and
unset it as well on a menu it after the menu has been created.
### menu definition:
my $MainMenu = new Win32::GUI::Menu(
"&File" => "File",
" > Update All &Data" => "GetData",
" > -" => 0,
" > E&xit" => "FileExit",
"&Search" => "Search",
" > Find &Name" => {-name => "FindName", -checked => 1},
" > Find &Building" => {-name => "FindBuilding", -checked => 0},
" > Find &Adapter Address" => {-name => "FindAdapter", -checked =>
0},
"&View" => "View",
" > Lar&ge Icons" => {-name => "ViewLarge", -checked => 0},
" > S&mall Icons" => {-name => "ViewSmall", -checked => 0},
" > &List" => {-name => "ViewList", checked => 0},
" > &Details" => {-name => "ViewDetails", -checked => 1},
"&Tools" => "Tools",
" > Add User Information" => "AddUser",
" > -" => 0,
" > Report &Problem" => "ReportProblem",
"&Help" => "Help",
" > About" => "About",
);
### main window definition that has the menu:
my $MainWindow = new Win32::GUI::Window(
-name => "MainWindow",
-top => ($screen_height - $minheight)/2,
-left => ($screen_width - $minwidth)/2,
-width => $minwidth,
-height => $minheight,
-minsize=> [$minwidth,$minheight],
-title => "$titlebar - No Data Loaded",
-menu => $MainMenu,
-class => $dbv_class,
);
### to change the checkmark from the "View -> Details" item to "View ->
List" you would put
### the following in your code:
sub ViewList_Click {
$MainMenu->{ViewLarge}->Checked(0);
$MainMenu->{ViewSmall}->Checked(0);
$MainMenu->{ViewList}->Checked(1); ### this turns on the checkmark
$MainMenu->{ViewDetails}->Checked(0); ### this turns off the checkmark
$MainWindow->DataView->SetImageList($user_sm);
$MainWindow->DataView->View(3);
$MainWindow->DataView->Arrange();
return;
}
I hope this helps. This came from a file in gatorbase.zip that i told the
group about. Check out the programs and maybe it will answer some of your
questions.
Jonathan Southwick
----- Original Message -----
From: "Jeremy Blonde" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 15, 2000 1:31 PM
Subject: Re: [perl-win32-gui] Changing the font size
> And to go along with that..
>
> Is there a way to change the properties of a window
> after it has been created? I'd like to be able to
> allow -topmost to be turned on and off. I can get it
> to work if I re-create the window, but I'd like to
> avoid doing that if possible.
>
> Also is there a way to set the checkmark for menu
> items after the menu has been created? Again, I can
> get it to work if I re-create the window.
>
> Thanks,
> Jeremy Blonde
>
> --- Sean Healy <[EMAIL PROTECTED]> wrote:
> > Here's something else I couldn't find in the
> > archives:
> >
> > Is it possible to change the size in a font object?
> > I've tried using the
> > Change method to change the size and then resetting
> > the font using the
> > SetFont method, but it doesn't work. I don't want
> > to create a whole bunch
> > of font objects just so I can have different sizes,
> > but that may be the only
> > solution. Any ideas?
> >
> _________________________________________________________________
> > Get your FREE download of MSN Explorer at
> > http://explorer.msn.com
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>