logo       
Google Custom Search
    AddThis Social Bookmark Button

Toolbar text broken on Wx-0.19 with unicode ??: msg#00009

Subject: Toolbar text broken on Wx-0.19 with unicode ??
I'm in the middle of a project and our customer complained about not seeing
some special characters in the application. (content is comming from a
database). So I decided to switch to Wx-0.19 with Unicode (5.6.1).

All seems fine except the toolbar.
I've got a toolbar with Text and Icons and these styles:
wxTB_HORIZONTAL|wxTB_FLAT|wxTB_TEXT

Unfortunatly all that remains of the text in the toolbar is the first
character. This only happens on Wx-0.19 with Unicode (5.6.1), not on the
same version without unicode.

As always I'm in need of a quick fix (in about 2 weeks we need to deliver)
but I'm afraid this can't be solved easily because I suspect I have to
compile it myself then. I can't risk using a CVS version because this app is
huge and testing it completely against a 'bleeding edge' version might take
to much time.

I created a small app (using wxGlade) without any icons to demonstrate the
problem.

Regards,

Huub Peters
---------------------------------------------------------------------------

#!/usr/bin/perl -w -- 
# generated by wxGlade 0.3.2 on Tue Sep 07 15:48:06 2004
# To get wxPerl visit http://wxPerl.sourceforge.net/

use Wx;
use strict;

package MyTestFrame;

use Wx qw[:everything];
use base qw(Wx::Frame);
use strict;

sub new {
 my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_;
 $parent = undef              unless defined $parent;
 $id     = -1                 unless defined $id;
 $title  = ""                 unless defined $title;
 $pos    = wxDefaultPosition  unless defined $pos;
 $size   = wxDefaultSize      unless defined $size;
 $name   = ""                 unless defined $name;

# begin wxGlade: MyTestFrame::new

 $style = wxDEFAULT_FRAME_STYLE
  unless defined $style;

 $self = $self->SUPER::new( $parent, $id, $title, $pos, $size, $style,
$name );
 $self->{label_1} = Wx::StaticText->new($self, -1, "Dummy text",
wxDefaultPosition, wxDefaultSize, );

# Tool Bar
 $self->{frame_1_toolbar} = Wx::ToolBar->new($self, -1, wxDefaultPosition,
wxDefaultSize, wxTB_HORIZONTAL|wxTB_FLAT|wxTB_TEXT|wxTB_NOICONS);
 $self->SetToolBar($self->{frame_1_toolbar});
 $self->{frame_1_toolbar}->AddTool(Wx::NewId(), "Test item 1", wxNullBitmap,
wxNullBitmap, wxITEM_NORMAL, "", "");
 $self->{frame_1_toolbar}->AddTool(Wx::NewId(), "Test item 2", wxNullBitmap,
wxNullBitmap, wxITEM_NORMAL, "", "");
 # Tool Bar end

 $self->__set_properties();
 $self->__do_layout();

 return $self;

# end wxGlade
}


sub __set_properties {
 my $self = shift;

# begin wxGlade: MyTestFrame::__set_properties

 $self->SetTitle("Toolbar testcase");
 $self->SetSize(400, 300);
 $self->{label_1}->SetBackgroundColour(Wx::Colour->new(212, 208, 200));
 $self->{frame_1_toolbar}->Realize();

# end wxGlade
}

sub __do_layout {
 my $self = shift;

# begin wxGlade: MyTestFrame::__do_layout

 $self->{sizer_1} = Wx::BoxSizer->new(wxVERTICAL);
 $self->{sizer_1}->Add($self->{label_1}, 1, wxEXPAND, 0);
 $self->SetAutoLayout(1);
 $self->SetSizer($self->{sizer_1});
 $self->Layout();

# end wxGlade
}

# end of class MyTestFrame

1;

package MyTest;

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

sub OnInit {
 my( $self ) = shift;

 Wx::InitAllImageHandlers();

 my $frame_1 = MyTestFrame->new();

 $self->SetTopWindow($frame_1);
 $frame_1->Show(1);

 return 1;
}
# end of class MyTest

package main;

unless(caller){
 my $test = MyTest->new();
 $test->MainLoop();
}

# ------------------------------------------------------------------------



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>