On 27/07/07, Veli-Pekka Tätilä <[EMAIL PROTECTED]> wrote:
> First of all, good to hear you are working on a TK-like layout manager.
> I'm looking forward to its release.

Don't hold you breath :-)  Just because it's on my list doesn't mean
that I'll get around to it.  Of course, anyone else is free to write
something and either release it themselves, or submit it for inclusion
with Win32::GUI.

> Although another great way to do
> GUis would be to design them with the Visual Studio tools and then load
> the resources in Win32::GUI. Is that supported, i.e. can I load plain
> Win32 dialogs or menus and have Perl do the event handling? I suppose
> not.

It would be possible to make this work, but I believe that our target
audience is primarily people who do not have access to the MS
toolchain - so it's not something I'm likely to look at.

> Is the Win32::GUI::MakeMenu() function documented as used by the Notepad
> example in 1.03? I don't see it mentioned anywhere.

I don't think so.  Documentation patches are always welcome!

> What's the difference between track bar and slider? i used the slider
> and it works great. However, my screen reader and MSDN calls the control
> a track bar. Most people I know talk casualy about sliderse or faders if
> it is a mixer.

MS call the control the TrackBar control in their documentation.
Win32::GUI::Slider appears to be an alias for Win32::GUI::Trackbar -
so I don't think there's a difference other than their name.

> Also I had two initial problems with the slider control. I failed to
> specify a size and was slightly disappointed that sliders cannot bundle
> a label with the control like check boxes can. Chek  boxes don't even
> need their size specified. Would be nice if sliders had a default size,
> too, though maybe this is a mishap in the underlying Win32 APi.

What default size would you suggest for a slider?  Like many of the
controls there isn't really a natural default size, so Win32::GUI uses
[0,0] if you don't provide one.

Slider controls suooper a concept called 'buddy' windows - you can
attach another window to the left/top or right/bottom (depending if
the slider is horizonal or vertical).  See the SetBuddy method.  It
works like this:

#!perl -w
use strict;
use warnings;

use Win32::GUI 1.05 qw(CW_USEDEFAULT);

my $mw = Win32::GUI::Window->new(
        -title => "Slider Demo",
        -size  => [400,300],
);

my $slider = $mw->AddSlider(
        -pos => [30,10],
        -size => [100,30],
        -selrange => 0,
);


$slider->SetBuddy(1, $mw->AddLabel(-text => 'Min'));
$slider->SetBuddy(0, $mw->AddLabel(-text => 'Max'));

$mw->Show();
Win32::GUI::Dialog();
$mw->Hide();
__END__

> On a more general note, how do I specify the tab order in a dialog?
Tab order is the same at the "z-order" of the child windows.  Whenever
a child window is created it is but at the end of the z-order list,
and so by default the tab-order is the order of window creation.

You can the z-order by using SetWindowPos() like this:

$window_to_reorder->SetWindowPos($window_to_insert_after, 0 ,0 ,0 ,0,
    SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIATE);


> Last but not least, how do I indicate that a
> group of radio buttons forms a radio control?

Research the WS_GROUP window style, and use the -group option to set it.

> Oh and before I forget:
> I have an unusual keybord interface where I'd like a push button to be
> pushed down  while a key is hehld down and released on key up. How would
> I go about this, are there key up / down events for buttons and how do I
> programmatically push a button in stead of clicking it which means push
> and release? Can I ignore keyboard messages that are a result of
> Windows's key repeat when a key is held down?

Generally unusual user-interface behaviour is a very bad idea.  If
you're sure that you want to proceed with this then from your
description you're heading in the right direction.  I don't
immediately remember if Win32::GUI::Button's allow easy access to
WM_KEYDOWN/WM_KEYUP messages, but you can always Hook() them.  You
want the  $button->SetState(1) to programatically make the button look
like it is pushed.

Reagrds,
Rob.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to