Re: [perl-win32-gui-users] Catching Combobox droplist mouse clicks

2005-05-23 Thread Robert May

Jez White wrote:


Kurt,

droplist didn't work with the mouse but it wasn't obvious why. I 
wonder if invoking Dialog() via an instance should be outright 
forbidden in GUI.pm or GUI.xs.



Unless there is a reason for Dialog to exists as a method - it 
probably should be forbidden - thoughts anyone?


I can't (personally) see any reason for calling Dialog() on a specific 
window, but given that MS allow GetMessage() to be called with a 
specific window handle, there must be cases when people want to do this, 
and Dialog() is written to allow it.  Hence, I wouldn't change it to be 
forbidden.


Perhaps a warning issued if Dialog() is not called statically?  
Something like:


if( PL_dowarn  items !=0) warn(You probably meant 
Win32::GUI::Dialog()\n);


near the start of the CODE section?

Regards,
Rob.




Re: [win32gui] [perl-win32-gui-users] Catching Combobox droplist mouse clicks

2005-05-07 Thread Jez White

Kurt,

droplist didn't work with the mouse but it wasn't obvious why. I wonder if 
invoking Dialog() via an instance should be outright forbidden in GUI.pm 
or GUI.xs.


Unless there is a reason for Dialog to exists as a method - it probably 
should be forbidden - thoughts anyone?


Cheers,

jez. 





[perl-win32-gui-users] Catching Combobox droplist mouse clicks

2005-05-05 Thread Kurt G
From reading this list it seems I'm wasn't the only Win32::GUI user 
befuddled by droplist style Combobox control not catching mouse clicks and 
other events. I spent way too much time yesterday RTFM, digging for a 
solution, and trying to get it to work but finally today stumbled into the 
solution:


If you create a Window and Combobox control like so:

  $Window = new Win32::GUI::Window( ... options ... );

  $Window-AddCombobox( ... options  );

...and if your main window is processing messages like so:

  $Window-Dialog();

...then it seems that not all messages (such as mouse clicks) are filtered 
down to the Combobox control (thus not allowing droplist items to be 
selected with mouse clicks) unless you change the above statement to this:


   GUI::Dialog();

...or I suppose Win32::GUI::Dialog() would work just the same, and presto, 
now you can mouse click on items in the Combobox droplist. Seems to affect 
which messages are being passed down to the Combobox control via its parent 
window.


I don't know if this is a Win32::GUI::Combobox bug or what but anyhow hope 
this hint is useful to other users running into similar issues.


-Kurt





Re: [win32gui] [perl-win32-gui-users] Catching Combobox droplist mouse clicks

2005-05-05 Thread Robert May

From the html page for the Win32::GUI class:

 Dialog()

 Enter the GUI dialog phase: the script halts, the user can interact 
with the created
 windows and events subroutines are triggered as necessary; note that 
this function
 must be called without ANY parameter or instantiation (eg. don't call 
it as method

 of a created object):

 Win32::GUI::Dialog();   # correct
 $Window-Dialog();# !!!WRONG!!!

 Win32::GUI::Dialog(); does a similar thing to 
while(Win32::GUI::DoEvents() != -1) {};


 see also DoEvents() see also DoModal()

Regards,
Rob.


Kurt G wrote:

From reading this list it seems I'm wasn't the only Win32::GUI user 


befuddled by droplist style Combobox control not catching mouse clicks 
and other events. I spent way too much time yesterday RTFM, digging 
for a solution, and trying to get it to work but finally today 
stumbled into the solution:


If you create a Window and Combobox control like so:

  $Window = new Win32::GUI::Window( ... options ... );

  $Window-AddCombobox( ... options  );

...and if your main window is processing messages like so:

  $Window-Dialog();

...then it seems that not all messages (such as mouse clicks) are 
filtered down to the Combobox control (thus not allowing droplist 
items to be selected with mouse clicks) unless you change the above 
statement to this:


   GUI::Dialog();

...or I suppose Win32::GUI::Dialog() would work just the same, and 
presto, now you can mouse click on items in the Combobox droplist. 
Seems to affect which messages are being passed down to the Combobox 
control via its parent window.


I don't know if this is a Win32::GUI::Combobox bug or what but anyhow 
hope this hint is useful to other users running into similar issues.


-Kurt




---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great 
events, 4

opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users