Questions tagged [wxperl]

wxperl is the module/library used to access the WxWidgets portable GUI classes.

50 questions
2
votes
2 answers

How can my WxPerl application ignore keypresses while a method runs?

I have an application that waits for the user to press a key and then executes a long running method that periodically updates the GUI. sub keypress{ my $self = shift; my $event = shift; if ($event->GetKeyCode() == WXK_F12){ …
pdemarest
  • 1,810
  • 1
  • 15
  • 16
1
vote
1 answer

App doesn't exit from MainLoop after dialog

I have this problem. I have solved, it but does it correct for big application (in future:)? #!/usr/bin/perl use strict; use warnings; use lib '.'; use MyApp; use LoginFrame; my $f = LoginFrame->new; $f->ShowModal; if(int($f->GetReturnCode)) { …
VeroLom
  • 3,856
  • 9
  • 34
  • 48
1
vote
2 answers

Has anyone used the Wx::GridBagSizer layout manager in Wx Perl?

The very sparse wxPerl documentation that I have been able to find says it is supported and sure enough, I can create an instance of it. my $layout = new Wx::GridBagSizer(5,5); But I cannot make it work. Specifically, I cannot add a widget to…
Rodney
  • 117
  • 1
  • 6
1
vote
1 answer

Perl using Wx yields core dump in debug mode (option -d)

I have the following 3 line example to show the error: use strict; use warnings; use Wx; It works fine when I run it with perl -w hue5.pl. However, when I add the debugging option and start if with perl -w -d hue5.pl, a problem emerges and perl…
1
vote
2 answers

Tiling bitmaps on a wxFrame

I want to set the background on a frame with tiling bitmaps, using wxPerl. With the help of an example from wxWidgets I've come up with the code below. Unfortunately, it doesn't do anything, the frame remains blank. Is this even the right way to do…
Patrik
  • 321
  • 1
  • 8
1
vote
1 answer

Catching key event in wxperl

I want to capture key presses at top level in a wxperl app. From the docs it seems one should use one of EVT_CHAR EVT_CHAR_HOOK EVT_KEY_DOWN. In the following code, EVT_LEFT_DOWN works, but EVT_KEY_DOWN (or any of the alternatives) doesn't. Anyone…
Patrik
  • 321
  • 1
  • 8
1
vote
0 answers

Wx::Log::SetFormatter is not available in wxperl to set a custom Log formatter

I am using wxperl(version .9932) for GUI interface in my console Application. I want to use a custom log formatter, and for this derived a class from 'Wx::PlLogFormatter' and override format subroutine in the derived class. this perl package…
1
vote
1 answer

Unable to run Perl code generated from wxGlade

I am trying to run Perl code generated using wxGlade but I am receiving this error . In text Can't load 'C:/Perl/site/lib/auto/Wx/Wx.dll' for module Wx: load_file:The specified module could not be found at C:/Perl/lib/Dynaloader.pm line…
Matt
  • 15
  • 4
1
vote
2 answers

Why does `print` not work in this wxPerl program?

In my frame constructor I have a function that easily makes a menu bar for me. package Routines; #This function will set up a menu #REQUIRED: entries #RETURNS: id, menu sub SetupMenu { $menuItemCount = 0; #Element number…
user400935
1
vote
1 answer

Can a subclass of wx::StaticBoxSizer handle events?

I'm trying to add an event-handler to a subclass of Wx::StaticBoxSizer, but I'm getting the following error: Can't locate object method "Connect" via package "Wx::StaticBoxSizer" at C:/strawberry/perl/site/lib/Wx/Event.pm line 38. Does that mean…
Bounderby
  • 525
  • 1
  • 6
  • 14
1
vote
2 answers

How to cancel a long time operation in WxPerl

I have a program like this ... $self->{bn1}=Wx::Button->new( $tb1, -1, 'Start'); EVT_BUTTON( $self, $self->{bn1}, \&on_click_start ); ... ... sub on_click_start { my( $this, $event ) = @_; $this->{bn1}->SetLabel("Cancel"); …
twjohn
  • 27
  • 1
  • 5
1
vote
3 answers

Is it possible to draw on a TextCtrl? And if so, how?

I'm trying to elaborate a TextCtrl with some line drawings: simple stuff I want to draw on the text, next to it, between lines, etc. And I'm approaching drawing in Wx like I've done it before, on WxPanels: with DCs: $dc->DrawLine( 15, 15, 120, 120);…
isync
  • 537
  • 6
  • 15
1
vote
1 answer

Force window to resize in Wx after resizing a child panel

I have a Frame containing a BoxSizer with a ListBox and Panel. I want to programmatically resize the panel and then force the Frame to resize. I can resize the Panel as below, but how do I force the BoxSizer or Frame to resize? The sample code…
Andrew Miller
  • 143
  • 1
  • 9
1
vote
1 answer

How to trigger events using wxperl?

does anybody have a working example for a wxperl-program which starts a second wxperl-program $cmd and sends events to it? I start $cmd using something like $frame = Wx::Frame->new(undef,-1,'MyName',wxDefaultPosition); $procID = Wx::NewId(); $proc =…
leu
  • 2,051
  • 2
  • 12
  • 25
1
vote
1 answer

Can't get EVT_KEY_DOWN to fire in wxPerl

In this case $self is a subclass of Wx::Frame and I can add controls, menus, etc to the frame. However I cannot add key events. I am using the following to add the key event: EVT_KEY_DOWN($self, \&_process_char); The _process_char function…
Chris Travers
  • 25,424
  • 6
  • 65
  • 182