Kieron,
I'm not sure that this is exactly what you're looking for, but it may point
you in the right direction. It doesn't trigger on a change via the drop-down
list, but it does capture keystrokes:
-start-
#! perl -w
use Win32::GUI qw(CBN_EDITCHANGE WM_COMMAND);
use strict;
my $x = Win32'GUI'
Doug,
That will work, but it breaks one of the golden rules of OO programming:
don't access internal object data directly. Of course, it doesn't help that
there isn't a 'Name' method! The same applies to the window handle
{-handle}, incidentally.
A more purist approach would be to use the U
Glenn,
I wouldn't expect it to prevent it from being checked. Do you expect this
behaviour from the Windows control itself or from Win32::GUI? Certain
actions for some controls have a "pre-change" notification (e.g. the
TCN_SELCHANGING notification sent when a tab is *about* to change), which
can
mbobox definition.
All the best,
Glenn2
> -Original Message-
> From: Glenn Linderman [mailto:[EMAIL PROTECTED]
> Sent: 19 February 2007 16:35
> To: Glenn W Munroe
> Cc: perl-win32-gui-users@lists.sourceforge.net
> Subject: Re: [perl-win32-gui-users] "Smart" Combobox
with the following line:
$mw->cb->Hook(CBN_EDITCHANGE,\&CB_Change);
Again, the CBN_EDITCHANGE constant isn't exported by Win32::GUI::Constants
(maybe these are considered internal and are purposely not exported), but
its value is 5.
I also notice that there is a
Glenn
_
From: Glenn W Munroe [mailto:gwmunroe @ gmail.com]
Sent: 16 February 2007 19:15
To: perl-win32-gui-users@lists.sourceforge.net
Subject: "Smart" Combobox
I've been trying to implement a "smart" combobox dropdown list. To get an
idea of what I
I've been trying to implement a "smart" combobox dropdown list. To get an
idea of what I'm talking about, compare the font dropdowns in Wordpad and
Word. In Wordpad, type "ar" into the control and "ar" is what you see. Tab
away of the control and it gets replaced with "Arial". That is easy enoug
when disabling the window, but in
hindsight, that's the expected behaviour anyway when disabling a window. It
should be possible to disable the controls in cascade, as for the resize.
Glenn
-Original Message-
From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 January, 20
I reworked my example using a child window instead of a group (as an
attachment to preserve formatting). I got exactly the same symptoms (no
tabbing to the child controls and no visual indication of a disabled child
control). I thought I had it when I discovered this:
"WS_EX_CONTROLPARENT Allow
Thanks, Jez. I hadn't thought of that! What styles do you use for the child
container windows? Does tabbing work as I had hoped?
Glenn
-Original Message-
From: Jeremy White [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 January, 2006 06:19
To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.s
It would be convenient to declare a groupbox and then identify the groupbox
as the parent control for other controls to facilitate positioning and
operations on the entire group (I think this would also be useful for
tabstrips, per the question the other day). The example below shows how
moving the
Glenn L.,
I agree--after mulling it over a few days I think this is the way to go, so
I've added the Feature Request as Rob suggested.
Glenn M.
-Original Message-
From: Glenn Linderman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 10 January, 2006 22:31
To: [EMAIL PROTECTED]
Cc: Gl
Igor,
I think you need a combination of the GetChild() and GetNextSibling()
methods. I'm not sure that MS would (or even should) publish internal
structures like that, but a good place to start is:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/commctls/t
k for top-level windows (I had a hunt on MSDN, but couldn't find the
relevant bit). I'll have a play with these new techniques and think about
that later.
Cheers,
Glenn
-Original Message-
From: Robert May [mailto:[EMAIL PROTECTED]
Sent: Monday, 09 January, 2006 17:41
To: Gl
It would be useful to be able to define handlers for key presses on a
per-control basis. For example, it is common to end text entry with a press
of the "Enter" key; the action on that key press could be different
depending on the control. I have tried to define different accelerator
tables for dif
I've been experimenting with toolbars recently and hit a snag. I needed some
simple icons, so I extracted a few from Shell32.dll and imported them using
BitmapInline. The problem is that some of them look really ugly and I've
been banging my head for days trying to figure out exactly what the probl
Hello Steve,
I was just compiling a reply to this when Rob beat me to it! He's given the
technical answer, but here's a rough-and-ready example using a label.
I noticed that the label disappears when you click button2, so you may have
to mess around to bring the label to the top each time the but
Johan,
I'm not quite sure who that question was aimed at, but as I first mentioned
that I had reinvented that particular wheel, then perhaps I should answer.
No, I hadn't tried it. I must have seen that post, but I had forgotten about
it. I'll give it a shot.
>From time to time on the list, someo
Emmanuel,
I think you're right: something isn't quite right about the detach method.
In Jez's example, there doesn't seem to be any difference if you comment out
the call to the method or not.
A couple of other lines from the manual:
"If the program exits without all other threads having been ei
Jez,
For a "rough" answer, that was very useful and interesting! These little
demo scripts are a goldmine of information. I have been using threads to
carry out background work while updating a progress bar in the main window
and providing a cancel button. It will be interesting to see Rob's
inter
, Glenn W Munroe wrote:
>The main window of my current project comprises a Grid control and a
>TreeView, in a Windows Explorer-like layout. I would like to provide the
>option of being able to resize the two controls by click-and-dragging the
>area between the two. Does anyone have any
The main window of my current project comprises a Grid control and a
TreeView, in a Windows Explorer-like layout. I would like to provide the
option of being able to resize the two controls by click-and-dragging the
area between the two. Does anyone have any tips on how to do this? I tried
adding a
Rob,
I used your Splashscreen module in my latest project. I noticed an ugly
little flash at times between when the splash window is created and when it
is centred on the screen. The adaptation to the module example below
demonstrates it when you press the button. It's not a major problem but i
All looks good to me--good work, Rob.
Glenn
-Original Message-
From: Robert May [mailto:[EMAIL PROTECTED]
Sent: Sunday, 13 November, 2005 17:05
To: Glenn W Munroe
Cc: perl-win32-gui-users@lists.sourceforge.net
Subject: Re: Next Release soon
Glenn W Munroe wrote:
> I just downloade
EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glenn
W Munroe
Sent: Friday, 28 October, 2005 12:27
To: [EMAIL PROTECTED]
Cc: perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Next Release soon
I spent a little time to dig into this more. As I suspected, this isn
I spent a little time to dig into this more. As I suspected, this isn't a
bug, but a change in implementation. Under version 1.01_01, the Kill()
method simply made a call to the system function KillTimer. Version 1.02_02
explicitly destroys the timer, which includes removing its definition from
the
Rob,
I just downloaded the 5.8 PPM from your site. It failed a new dependency
check for Test::More. This module is available on CPAN, but not on the
ActiveState repository. I had a quick look through the code and couldn't
find where it was used; could it be a hangover from some testing you were
do
Greg,
I'm not sure if this is exactly what you're looking for (the KeyDown bit
confused me), but if you replace the event declaration in your example from
sub LV_ReturnPressed {
to
sub LV_ReturnPressed_Click {
then you get the "Return Pressed" message.
Glenn
-Original Message-
From:
Jez,
I got similar results to the other guys:
First script: No problems
Second script: Error loop on exit, but with a different error message:
"Can't locate auto/Toolbar.al in @INC..."
I'm running:
- XP Pro SP2
- Perl 5.8.7 ActiveState build 813
- Win32::GUI 1.02
Glenn
-Original
Emmanuel,
It's just a typo in the button definition. Add a comma at the end of the
line:
-left => 360
And it will work.
Glenn
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel E
Sent: Thursday, 21 July, 2005 06:00
To: perl-win32-gui-users@lists
seful technique!
Cheers,
Glenn
-Original Message-
From: Robert May [mailto:[EMAIL PROTECTED]
Sent: Monday, 11 July, 2005 21:28
To: Glenn W Munroe
Cc: 'CGIexpo.com Support'; perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] listview text color
Glenn W M
Rob,
I, too, have been using RC1 for a week or so with no problems. I also would
be quite happy to test RC2.
You've done some good work. I'm grateful for you sharing your work with us
and I'm sure the other users would agree.
Glenn Munroe
-Original Message-
From: [EMAIL PROTECTED]
[mail
I'm afraid the short answer is "no" (as far as I'm aware)--at least not
using the latest Win32::GUI release. Someone asked this a year or so ago and
I looked into it, eventually coming up with a tremendous hack (using hooks)
to get it to work. Since then, the XS code has changed and the hack doesn'
ner, it would be cleaner (and safer).
Glenn_2
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glenn
Linderman
Sent: Thursday, December 23, 2004 18:57
To: Glenn W Munroe
Cc: 'Glenn Linderman'; perl-win32-gui-users@lists.sourceforge.net
Subje
);
$mw->Show();
Win32::GUI::Dialog();
sub btTest_Click {
Win32::GUI::Tooltip::UpdateTipText($mw->{-tooltip},
$mw->btTest, "Updated Tooltip");
}
Glenn
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECT
er 23, 2004 10:13
To: Glenn W Munroe
Subject: Re: [perl-win32-gui-users] Tooltips again
On approximately 12/22/2004 11:59 PM, came the following characters from the
keyboard of Glenn W Munroe:
> Has anybody been able to get the Tooltip package to work? The only
> example I've found is
Has anybody been able to get the Tooltip package to work? The only example
I've found is in Johan's Loft examples, but it doesn't work on my system and
I can't figure out the correct parameters to make it work.
Alternatively, has anybody been able to change the tooltip created with the
-tip optio
Calvin,
>From the ActiveState FAQ:
"Signals are unsupported by the Win32 API. The C Runtime provides crude
support for signals, but there are serious caveats, such as inability to
die() or exit() from a signal handler. Perl itself does not guarantee that
signal handlers will not interrupt critica
blue) - this is using XP styles - do you get the same?
Now, as for why it doesn't work in my main app...
Thanks,
jez.
----- Original Message -
From: Glenn W Munroe <mailto:[EMAIL PROTECTED]>
To: 'Jez White' <mailto:[EMAIL PROTECTED]> ; 'Win32-GUI&
ide;},
);
$mainWindow->Show;
Win32::GUI::Dialog();
sub Show {
#select the first and last items
$mainWindow->ListView->Show;
$mainWindow->ListView->Select(0);
$mainWindow->ListView->Deselect(1);
$mainWindow->ListView->Deselect(2);
$mainWindow->ListView->S
Jez,
I hope this isn't a stupid question, but have you tried Select(INDEX) and
Deselect(INDEX)? I don't think they are exact equivalents of SetSel, but
they do what I *think* you want to do.
Glenn
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jez
White
Sent: Thursda
All,
I also agree. You'll probably have noticed a number of questions recently on
the user list where the answer relied on the development code. If anybody
does get around to building a new release, I have added some code to
Listview.xs that I would like to get included.
Incidentally, has anybody
Have you set the -dialogui option for your main window? That should
do it, but again, it may depend on having the latest code. Someone else had
this problem a few weeks ago; the code that worked fine on my system
wouldn't work on his.
As for the documentation, that's always a little behind
Marc,
Yes, I fell into the trap (again) of assuming that everyone is running the
development version of the module (0.0.681), as I do. When I reverted to
0.0.671, it failed, with the message you show.
The development code has a number of new features that I think are very
useful. If you want to c
Brian,
I do something similar in my application. Have you looked at the -dropdown
and -dropdownlist options? The different behaviours are explained at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/commctls/comboboxes/comboboxes.asp
I use -dropdown with a Got
Daniel,
When I read this, I thought that the problem would be a missing -dialogui
option, but then I saw you had that. After that, I removed the "hack" code
and it still worked--am I missing the point? On my system, you can tab
between textfields using the following code:
use Win32::GUI;
my $wi
Mark,
...and just for completeness, I have substituted the -addstyle option in my
own application with the two options below:
-dropdown => 1,
-vscroll => 1,
Glenn
-Original Message-
From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 01:03
To:
-Original Message-
From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 01:03
To: 'Mark Nettlingham'
Subject: RE: [perl-win32-gui-users] Listboxes and dropdowns
Mark,
The '-style' option is deprecated, as it resets any bits that you do
Eric,
Try:
-sortascending => 1
or
-sortdescending => 1
(the other) Glenn
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric
Hansen
Sent: Tuesday, August 03, 2004 18:52
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] ListView (Ca
A couple of months ago, after a new release, I found that all the textfields
in my application were coming up highlighted. I didn't mention it at the
time, as I guessed the new release had just exposed a bug in my code, but
after a bit more digging, I think it may be a problem with the -noflicker
o
ot;II",hex(CLR_BLUE),hex(CLR_WHITE))
} elsif ($dwItemSpec==2) {
$clrText=pack("II",hex(CLR_GREEN),hex(CLR_BLACK))
} else {
return
}
$CopyMemory->Call($lParam+48, $clrText, 8);
Jonathan,
I've been doing a lot of work with ListViews recently, so I decided to
have a look at this. One way to go is to use Steve Pick's Hook method to
grab the NM_CUSTOMDRAW notification (though there may be an easier way).
I got most of the way, but have been tearing my hair out trying to
figu
-Original Message-
From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 28 January, 2004 19:47
To: '[EMAIL PROTECTED]'
Subject: RE: [perl-win32-gui-users] Listview Colors and Buttons
Images...
Ramy,
To set ListView colours, try, for example:
$Window
From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Glenn W Munroe
> Sent: 20 January 2004 10:52
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: RE: [perl-win32-gui-users] Accelerator bug?
>
>
>
> Just out of interest, is anybody really using the NEM?
s email address from 1/15
until now.
On approximately 1/16/2004 8:28 AM, came the following characters from
the keyboard of Glenn W Munroe:
> Glenn,
>
> I haven't really used the NEM much yet, but when I knocked up a small
> test script this morning with the new model I found
Chris,
I, too, am using MinGW and nmake to build the module following Laurent's
instructions and had no problem with the latest CVS update this morning.
I am running XP Pro. The only thing I noticed was that you mentioned a
Win32-GUI-0_0_670-fix branch. I don't believe there is such a branch.
Was
I have just posted my new ListView Select methods to the Tracker as a
Feature Request. Perhaps some kind soul (Steve? Laurent?) with CVS write
access would be good enough to take a look and commit the changes to
ListView.xs if all looks OK.
The consensus of opinion seemed to be that SelectAll() is
Glenn,
I haven't really used the NEM much yet, but when I knocked up a small
test script this morning with the new model I found that accelerators
didn't work. Had you noticed this or can you confirm it? If so, is it a
bug with accelerators themselves or some underlying "feature" of the
system?
R
>>Personally, I would prefer SelectAll over Select(-1). Is it necessary?
>>I
>Is it idiomatic? Traditionally in Perl, indexing with -1 means "one
from
>the end of the array". And -1 is kind of magic (in a bad way), whereas
>SelectAll is very explicit, clear and obvious in a nice way.
Thanks fo
I've been doing a lot of work with listviews recently. I was pretty sure
I'd identified a bug with the Select method, but can't reproduce it any
more. While looking at that I added some functionality to my own copy of
Listview.xs: Select(-1) to select all items in the list and an
additional Deselec
Laurent,
Thanks for your reply. Yes, you're right: the problem was that I didn't
have all the new sources. When I downloaded them, it compiled fine and
the example code then worked. It didn't work before with the 670-PPM-5.8
so I think the moral for anyone wanting to use Hooks is that they should
Laurent,
Thanks for your reply. Yes, you're right: the problem was that I didn't
have all the new sources. When I downloaded them, it compiled fine and
the example code then worked. It didn't work before with the 670-PPM-5.8
so I think the moral for anyone wanting to use Hooks is that they should
Steve,
I've been tearing my hair out for a few days trying to get these Hooks
to work (and hoping not to have to bug you), but am just about out of
ideas. The following code (as brief as I can make it) doesn't work:
use Win32::GUI;
my $mw = new Win32::GUI::Window(-name => "mw");
sub mw_Terminate
iculous. But it
seems I always have something else more important to do when I get near
the computer, rather than try out this sort of thing.
Another alternative, of course, is to use the Win32::API module to
create a new interface to the Windows SendMessage API rather than using
the one in Win32:
Thanks for that, Steve. I'll be looking out for the new implementation.
In the meantime, I've been playing with some other messages and always
seem to hit the same problem with pointers to structures. When you say
"you can't use Perl to resolve the pointer" does that mean it is
impossible without X
Hello Steve and/or other developers,
I've been trying to get the ListView EditLabel feature to work. I can
turn it on OK and have got the handle to the edit control and through
that the control's contents. The problem is that the control is created
and destroyed automatically, and it is difficult
Glenn, I know that accelerator tables are broken and that you've put a
lot of work into figuring out why. I could never get them to work at all;
will this work now or just when the long-awaited fix is released? If it
will work now, would you please post a snippet of code so I can see what
I'm doin
>>On a related note, does anyone know how to make BrowseForFolder start
>>at a given directory? The -root option almost does it, but it would be
nice
>>to
>>start in the current directory and allow the user to navigate up and
>>down from there.
>>
>>Glenn
> There is an undocumented '-directory' op
On a related note, does anyone know how to make BrowseForFolder start
at a given directory? The -root option almost does it, but it would be nice
to
start in the current directory and allow the user to navigate up and
down from there.
Glenn
-Original Message-
Date: Wed, 05 Mar 2003 15:31:
Can anybody tell me how to set the initial state of a ListView checkbox?
I know I can test the state with the ItemCheck method, but what about
setting it? I tried setting a "checked" option, but that didn't work:
my $item = $mw->ListView->InsertItem(
-item=> $mw->ListView->Count(),
-text
70 matches
Mail list logo