Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: ListBox in Notebook doesn't accept mouse input: msg#00017

lang.perl.wxperl

Subject: Re: ListBox in Notebook doesn't accept mouse input

DH wrote:

--- "sky@xxxxxxxxx" <sky@xxxxxxxxx> wrote:

riginal Message:
-----------------
From: DH crazyinsomniac@xxxxxxxxx
Date: Sun, 13 Feb 2005 20:47:05 -0800 (PST)
To: sky@xxxxxxxxx, wxperl-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [wxperl-users] ListBox in Notebook doesn't accept mouse input


Because I am psychic, I know you're listening for some kind of mouse event,
and you're not Skip-ing. You need to Skip

Thanks for the reply. I am not explicitly listening for a mouse event. Does
the Notebook have an implicit mouse event which I need to skip or delegate
to the list box?
Do I just have to use an event handler which gets the Wx::Event object and
calls Skip on it?

No and no.
What you need to do is submit a minimal code snippet which demonstrates
the undesired behaviour.

Despite my psychic ability,
I can't envision any other scenario other than the one I described,
but in either case you should've tendered code rather than a description.

I'm assuming the code I submitted in my first message was insufficient, so here is a self-contained wxPerl app which demonstrates the problem.

package TestFrame;

use strict;
use Wx qw(:everything);
use base 'Wx::Frame';
use Wx::Event qw(EVT_MENU EVT_BUTTON EVT_LIST_ITEM_ACTIVATED
EVT_RADIOBUTTON);

sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);

# Create a panel for the whole window or frame
$self->{panel} = Wx::Panel->new($self, -1, [0, 0], $self->GetSize());

my ($width, $height) = $self->GetSizeWH();
# Create a 'notebook' (i.e. a set of tabs)
$self->{notebook} = Wx::Notebook->new($self->{panel}, -1, [0, 0],
[$width, $height - 70]);
# Create a panel for active/unsent invoices
$self->{panel_unsent} = Wx::Panel->new($self, -1);

# Create a panel for sent/archived invoices
$self->{panel_sent} = Wx::Panel->new($self, -1);

# So they are visible, add these panels to the notebook
$self->{notebook}->AddPage($self->{panel_unsent},
"Unsent/active invoices");
$self->{notebook}->AddPage($self->{panel_sent},
"Sent/archived invoices");

# Create an OK button that will be displayed below the notebook/tabs.
$self->{button_ok} = Wx::Button->new($self->{panel}, -1, "OK",
[ ($width - 60) / 2, $height - 60 ]);

# Add items to the unsent/active tab
$self->{list_active} = Wx::ListBox->new($self->{panel_unsent},
-1, [5, 5], [200, 370], [1, 2, 3], wxLB_ALWAYS_SB | wxLB_SORT);
#$self->{list_active}->Append($_) for (1 .. 100);

EVT_BUTTON($self, $self->{button_ok}, sub { $self->Close(1) });

$self->SetIcon(Wx::Icon->new('icircle.ico', wxBITMAP_TYPE_ICO));

return $self; }


package TestApp;

use strict;
use base 'Wx::App';
use Wx qw(:everything);

# We must provide an "OnInit" function that specifies what frames
# our application will use.
sub OnInit {
my $self = shift;
my $mainFrame = TestFrame->new(
undef, # Parent window
-1, # Window ID
'Foo', # Window title
[5, 5], # X, Y position
[600, 480] # X, Y size
);

$self->SetTopWindow($mainFrame); # Set the top-level window.
$mainFrame->Show(1); # Show the frame.
}

package main;

TestApp->new()->MainLoop;





Thanks,

Nick


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation