Two things:
It sounds like you are trying to do something with the menu that isn't
part of a standard GUI guideline. What is this extra text for? A help
string? That would appear in a status bar if your frame has one.
If you must do this, look at the string formatting methods like ljust
and rjust. If you know the longest string, add one or two character
spaces to that, and use the ljust method, you can reproduce this. (I
use it for printing tables.) I'm not sure why you would want to.
Josh
···
On Tue, Jul 29, 2008 at 4:07 AM, Maarten Stol <maarten.stol@neonova.nl> wrote:
Hi,
This is about the use of \t in the text of a menu item.
when i call wx.MenuItem like this:
item = wx.MenuItem(menu_Actions, self.ID_AN_ENTER, _('Some action:\tEnter'),
_("Some action"))an accelerator is created automatically because i use the \t character in
the menu item text. (see p. 309, Ch 10.2.3 in the wxPython in action book)However, i would like to use the \t tab character **without** wxPython
processing what follows automatically.I.e., I would like to disable processing of what follows after the \t, and
put any text I like there. Right now, when I put some text there that
wxPython does not recognize, that text is ignored, and the remainder of the
menu item text is left blanc.I can get the accelerator to work anyway via an accelerator table, but
somehow wxPython does not allow me to put arbitrary text after the \t
character.I **do need** the \t however, to get my menu texts aligned properly.
Is there an easy way to disable the \t processing?
Is there another easy workaround?many thanks,
MaartenPython 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2wx.version()
'2.8.4.0 (gtk2-unicode)'
--
NeoNova BV, The Netherlands
Professional internet and VoIP solutionshttp://www.neonova.nl Kruislaan 419 1098 VA Amsterdam
info: 020-5628292 servicedesk: 020-5628292 fax: 020-5628291The following disclamer applies to this email:
http://www.neonova.nl/maildisclaimer
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
--
Josh English
Joshua.R.English@gmail.com