On Mon, May 17, 2010 at 8:00 AM, Mark Dootson <mark.doot...@znix.com> wrote:
> Hi,
>
> You probably want GetLabel rather than GetText.
> GetText returns string + control characters, which isn't necessarily what
> you expect. (e.g. it will include platform and version specific escaping in
> addition to any control chars you explicitly included.)
> GetLabel returns string without control chars.
>
> NOTE: The above methods are for Wx::MenuItem. For Wx::Menu, the GetLabel
> method has the opposite meaning.

Hi Mark,

that's it. Apparently GetLabel does what I need.


my $e = $edit->Append( 998,       "&Setup" );
$e->GetLabel;  # Setup
$e->GetText;    # _Setup

my $e = $edit->Append( 998,       "A_B" );
$e->GetLabel;  # A_B
$e->GetText;    # A__B

I fixed it in my code and updated the blog entry I wrote about the
whole process.

BTW I see you have a blog at http://www.wxperl.co.uk/binaryoasis/
IMHO it would be nice if you added it to http://ironman.enlightenedperl.org/
and to http://perlsphere.net/ to get some more exposure in the Perl community.

regards
Gabor

Reply via email to