wx.Html.HtmlTextFieldTagHandler Class Reference

Inheritance diagram for wx.Html.HtmlTextFieldTagHandler:

wx.Html.HtmlTagHandler wx.Object

List of all members.

Public Member Functions

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

Detailed Description

This tag handler will produce a text field in wxHTML pages using the wx.TextCtrl.

Add an instance of this to the tag handlers of an HTML parser before use:

 wx.Html.HtmlWindow html = new wx.Html.HtmlWindow(this);
 html.Parser.AddTagHandler(new wx.Html.HtmlTextFieldTagHandler());
From this code on, html.Parser will understand the tag "WXTEXT" with the following parameters:
textProvides the default text that will be displayed before the user put something in.
idA positive integer - the id of the created text window.
widthSpecifies the width in pixels
heightSpecifies the height in pixels
stylesIs a comma-separated list of style names (like TE_MULTILINE or TE_PASSWORD) that will be used to create the window. Additional styles: DIRECTORY or DIRECTORY_LIST. These styles will add a button that will open a directory selector.
fgcolorThe foreground (text) color in HTML notation
bgcolorThe background color in HTML notation.

Please note, that the tag handler may raise EVT_TEXT() events (class wx.CommantEvent) with empty string on startup. In contrast to the standard bahaviour of the wx.TextCtrl, the control used by this tag handler will also raise a EVT_TEXT_ENTER event on loosing the focus. Unfortunately, you may encounter unexpected senders. The sender will be determined according to the C++ interface to the wxWidgets system - the class that implements the used event table.

Constructor & Destructor Documentation

wx.Html.HtmlTextFieldTagHandler.HtmlTextFieldTagHandler (  ) 

Member Function Documentation

override string wx.Html.HtmlTextFieldTagHandler.GetSupportedTags (  )  [virtual]

Use this to define the tags that this handler implements. Return a comma-separated list of tag names like "I,B,FONT,P".

Please note, that in contrast to modern XML-compatible conventions wxWidgets uses upper case letters as standard form for tag names. For this reason, wx.NET will convert th result of this method automatically into upper case form. However, analogous code in C++ will probably not run with the original wxWidgets in C++ if this result contains lower case letters.

Implements wx.Html.HtmlTagHandler.

override bool wx.Html.HtmlTextFieldTagHandler.HandleTag ( HtmlTag  tag  )  [virtual]

Implement the tags as defined by GetSupportedTags().

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