C# Class Fluqi.Widget.jSelectMenu.SelectMenu

Inheritance: Core.ControlBase, IControlRenderer, IControl
Show file Open project: toepoke/Fluqi Class Usage Examples

Public Methods

Method Description
GetStartUpScript ( ) : string

Renders (and returns) the JavaScript required to initialise the SelectMenu control with the required options. A jQuery document.ready section is wrapped around the script.

GetStartUpScript ( bool incDocReady ) : string

Writes out the tabs initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

Items ( ) : jSelectMenuItem.SelectMenuItems

The SelectMenuItems that should appear under the SelectMenu

Render ( ) : void

Writes the HTML for the SelectMenu control to the response stream.

RenderStartUpScript ( ) : void

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

RenderStartUpScript ( bool incDocReady ) : void

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

SelectMenu ( TextWriter writer ) : System

Detailed constructor

SelectMenu ( TextWriter writer, string id ) : System

Detailed constructor

WithAttribute ( string attrName, string attrValue ) : SelectMenu

Registers an HTML attribute to be added to the control when it is rendered.

WithCss ( string cssClasses ) : SelectMenu

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).

WithStyle ( string styleName, string styleValue ) : SelectMenu

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.

Protected Methods

Method Description
GetControlScript ( ) : string

Writes out the initialisation JavaScript to configure the tabs object client-side.

Useful if you want to declare your own document.ready and add in the initialisation yourself (if you have additional initialisation you want to perform for instance).

GetControlScript ( int tabDepth ) : string

Writes out the calling script for the jQuery Tabs plugin, adding options that have been a defined.

GetTagHtml ( ) : string

Builds and returns the HTML for the SelectMenu control (basically the DIV). JavaScript initialisation for the control is also added to the response stream if the AutoScript rendering option is true.

Reset ( TextWriter writer, string id ) : void

Initialises the control back to its initial state

WithID ( string idValue ) : SelectMenu

Registers an ID attribute to be added to the control when it is rendered.

Method Details

GetControlScript() protected method

Writes out the initialisation JavaScript to configure the tabs object client-side.
Useful if you want to declare your own document.ready and add in the initialisation yourself (if you have additional initialisation you want to perform for instance).
protected GetControlScript ( ) : string
return string

GetControlScript() protected method

Writes out the calling script for the jQuery Tabs plugin, adding options that have been a defined.
protected GetControlScript ( int tabDepth ) : string
tabDepth int /// How far to indent the script code setting. ///
return string

GetStartUpScript() public method

Renders (and returns) the JavaScript required to initialise the SelectMenu control with the required options. A jQuery document.ready section is wrapped around the script.
public GetStartUpScript ( ) : string
return string

GetStartUpScript() public method

Writes out the tabs initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public GetStartUpScript ( bool incDocReady ) : string
incDocReady bool /// If true wraps the initialisation script with a jQuery document.ready section /// If false only the control initialisation script is written. ///
return string

GetTagHtml() protected method

Builds and returns the HTML for the SelectMenu control (basically the DIV). JavaScript initialisation for the control is also added to the response stream if the AutoScript rendering option is true.
protected GetTagHtml ( ) : string
return string

Items() public method

The SelectMenuItems that should appear under the SelectMenu
public Items ( ) : jSelectMenuItem.SelectMenuItems
return jSelectMenuItem.SelectMenuItems

Render() public method

Writes the HTML for the SelectMenu control to the response stream.
public Render ( ) : void
return void

RenderStartUpScript() public method

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public RenderStartUpScript ( ) : void
return void

RenderStartUpScript() public method

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public RenderStartUpScript ( bool incDocReady ) : void
incDocReady bool /// If true the control initialisation is wrapped in a jQuery document.ready and script /// declaration. /// If false no wrapping takes place. ///
return void

Reset() protected method

Initialises the control back to its initial state
protected Reset ( TextWriter writer, string id ) : void
writer System.IO.TextWriter Writer to use when rendering the control
id string ID to render for the control
return void

SelectMenu() public method

Detailed constructor
public SelectMenu ( TextWriter writer ) : System
writer System.IO.TextWriter Response stream to write the control to
return System

SelectMenu() public method

Detailed constructor
public SelectMenu ( TextWriter writer, string id ) : System
writer System.IO.TextWriter Response stream to write the control to
id string ID of the control (which must be unique on the page)
return System

WithAttribute() public method

Registers an HTML attribute to be added to the control when it is rendered.
public WithAttribute ( string attrName, string attrValue ) : SelectMenu
attrName string Name of the HTML attribute, e.g. "Menu" or "id" for example
attrValue string Value to be applied when the attribute is rendered
return SelectMenu

WithCss() public method

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).
public WithCss ( string cssClasses ) : SelectMenu
cssClasses string Set of space separated CSS class names to add
return SelectMenu

WithID() protected method

Registers an ID attribute to be added to the control when it is rendered.
protected WithID ( string idValue ) : SelectMenu
idValue string Value for the ID
return SelectMenu

WithStyle() public method

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.
public WithStyle ( string styleName, string styleValue ) : SelectMenu
styleName string Name of the style attribute to be added
styleValue string Value of the style to be added
return SelectMenu