Public Member Functions | |
override string | GetSupportedTags () |
override bool | HandleTag (HtmlTag tag) |
HtmlButtonTagHandler () | |
Classes | |
class | CmdClosure |
wxbutton
that defines a button on an HTML page raising a command event.
Use attributes label
to provide a string to be displayed as a label and id
to provide an integer command ID for the event. Additionally instead of specifying a cmd
, you might also use eventstring
. If an event string is specified, the command event caused by the button will also hold the event string in the appropriate member variable. Sample
<wxoption label="Label" id="100">
labelart
to specify a label bitmap instead of a label string. string.Format("<wxbutton labelart=\"{0}\" id=\"{1}\" eventstring=\"This can be read from the event.\">", (int)ArtID.wxART_QUESTION, (int)MenuIDs.wxID_ABOUT);
string.Format("<wxbutton artid_label=\"QUESTION\" width=16 height=16 id=\"{0}\" eventstring=\"This can be read from the event.\">", (int)MenuIDs.wxID_ABOUT);
string.Format("<wxbutton artid_label=\"wxART_QUESTION\" width=16 height=16 id=\"{0}\" eventstring=\"This can be read from the event.\">", (int)MenuIDs.wxID_ABOUT);
string.Format("<wxbutton artid_label=\"QUESTION\" styles=\"BU_AUTODRAW\" width=16 height=16 id=\"{0}\" eventstring=\"This can be read from the event.\">", (int)MenuIDs.wxID_ABOUT);
Parameter | Effect |
---|---|
width | The width of the button in pixel. |
height | The height of the button in pixel. |
id | The window ID of the created button control. |
fgcolor | The foreground (text) color in HTML notation |
bgcolor | The background color in HTML notation. |
wx.Html.HtmlButtonTagHandler.HtmlButtonTagHandler | ( | ) |
override string wx.Html.HtmlButtonTagHandler.GetSupportedTags | ( | ) | [virtual] |
Handler for HTML tag "WXBUTTON". Please note, that in contrast to modern XML-compatible conventions wxWidgets uses upper case letters as standard form for tag names. So, use upper class letters here exclusively.
Implements wx.Html.HtmlTagHandler.
override bool wx.Html.HtmlButtonTagHandler.HandleTag | ( | HtmlTag | tag | ) | [virtual] |
This generates a window with a single button to be placed into the HTML page. Return value is false to enable inner parsing.
Implements wx.Html.HtmlTagHandler.