added <accel> attribute to wxMenuItem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,8 +69,13 @@ wxObject *wxMenuXmlHandler::DoCreateResource()
|
|||||||
{
|
{
|
||||||
int id = GetID();
|
int id = GetID();
|
||||||
bool checkable = GetBool(wxT("checkable"));
|
bool checkable = GetBool(wxT("checkable"));
|
||||||
|
wxString label = GetText(wxT("label"));
|
||||||
|
wxString accel = GetText(wxT("accel"));
|
||||||
|
wxString fullLabel = label;
|
||||||
|
if (!accel.IsEmpty())
|
||||||
|
fullLabel << wxT("\t") << accel;
|
||||||
|
|
||||||
wxMenuItem *mitem = new wxMenuItem(p_menu, id, GetText(wxT("label")),
|
wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel,
|
||||||
GetText(wxT("help")), checkable);
|
GetText(wxT("help")), checkable);
|
||||||
|
|
||||||
#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
|
#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__)
|
||||||
|
@@ -2,6 +2,7 @@ node wxMenuItem
|
|||||||
type normal
|
type normal
|
||||||
icon 0
|
icon 0
|
||||||
var label of text
|
var label of text
|
||||||
|
var accel of text
|
||||||
var help of text
|
var help of text
|
||||||
var checkable of bool
|
var checkable of bool
|
||||||
var checked of bool
|
var checked of bool
|
||||||
|
Reference in New Issue
Block a user