wx.Html.HtmlButtonTagHandler Class Reference

Inheritance diagram for wx.Html.HtmlButtonTagHandler:

wx.Html.HtmlTagHandler wx.Object

List of all members.

Public Member Functions

override string GetSupportedTags ()
override bool HandleTag (HtmlTag tag)
 HtmlButtonTagHandler ()


class  CmdClosure

Detailed Description

A handler for tag 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">
You might use 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);
Alternatively, you may provide the name of an art item as "artid_label" value. Example:
     string.Format("<wxbutton artid_label=\"QUESTION\" width=16 height=16 id=\"{0}\" eventstring=\"This can be read from the event.\">", (int)MenuIDs.wxID_ABOUT);
This also works:
     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);
Styles may be defined as text attribute "styles". The corresponding text will be parsed by the parser of enumeration wx.WindowStyles.
     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);
Additional parameters of the WXBUTTON tag are:
widthThe width of the button in pixel.
heightThe height of the button in pixel.
idThe window ID of the created button control.
fgcolorThe foreground (text) color in HTML notation
bgcolorThe background color in HTML notation.

Constructor & Destructor Documentation

wx.Html.HtmlButtonTagHandler.HtmlButtonTagHandler (  ) 

Member Function Documentation

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.

Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads