Table of Contents

Class TextButtons

Namespace
PolarStudio
Assembly
PolarStudio.dll

This class is used to create and manipulate text buttons.

public class TextButtons : IEnumerable
Inheritance
TextButtons
Implements
Inherited Members
Extension Methods

Properties

this[object]

This default property returns the element by the given index.

public TextButton this[object pIndex] { get; }

Parameters

pIndex object

The index to return. Either an int or the name of a textbutton.

Property Value

TextButton

The requested element or Nothing if not found.

Methods

AddButton(string, string, string, string, string, ButtonUpdatePolicy, bool, bool, bool, bool, string, string)

This method is used to create a new text button and add it to this TextButtons container.

public TextButton AddButton(string pName, string pCaptionHtmlTC, string pExplanationTC, string pActionScript, string pClassName = "", ButtonUpdatePolicy pUpdatePolicy = ButtonUpdatePolicy.Update, bool pVisible = true, bool pEnabled = true, bool pVisibleForModalForm = false, bool pEnabledForModalForm = false, string pConfirmationQuestion = "", string pTag = "")

Parameters

pName string

A unique name for programming purposes.

pCaptionHtmlTC string

The caption of the button. Can contain HTML.

pExplanationTC string

An explanation to show with a mouse-over

pActionScript string

The script-expression to evaluate when this button is clicked.

pClassName string

An optional additional css class that is added to the html for this text button.

pUpdatePolicy ButtonUpdatePolicy

The update policy.

pVisible bool

A boolean indicating if this button is visible.

pEnabled bool

A boolean indicating if this button is enabled.

pVisibleForModalForm bool

A boolean indicating if this button is visible when a modal form is shown (like the add new record form).

pEnabledForModalForm bool

A boolean indicating if this button is enabled when a modal form is shown (like the add new record form).

pConfirmationQuestion string

A string to ask the user for confirmation before executing the script for this button.

pTag string

A tag for programming purposes.

Returns

TextButton

Count()

Returns the number of elements in this collection.

public int Count()

Returns

int

The number of elements in this collection.

CreateHTML(clsString, object, string)

This method renders the text buttons and adds the HTML to the passed pResultHTML clsString

public void CreateHTML(clsString pResultHTML, object pModalFormShown, string pDefaultClassName = "")

Parameters

pResultHTML clsString

The clsString object that will contain the rendered html

pModalFormShown object

A boolean indicating a modal form is shown.

pDefaultClassName string

An optional default css class name to use.

GetButtonByNumber(int)

This method returns the button by the internal ButtonNumber

public TextButton GetButtonByNumber(int pButtonNumber)

Parameters

pButtonNumber int

The number of the text button.

Returns

TextButton

The text button for the given number or Nothing if not found.

GetEnumerator()

The enumerator.

public IEnumerator GetEnumerator()

Returns

IEnumerator

Remove(object)

This method removes a button by index.

public void Remove(object pIndex)

Parameters

pIndex object

The index to remove. Either the real index (int) or the name of the button.

RemoveAll()

This method removes all text buttons from this set of text buttons.

public void RemoveAll()