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
objectThe 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
stringA unique name for programming purposes.
pCaptionHtmlTC
stringThe caption of the button. Can contain HTML.
pExplanationTC
stringAn explanation to show with a mouse-over
pActionScript
stringThe script-expression to evaluate when this button is clicked.
pClassName
stringAn optional additional css class that is added to the html for this text button.
pUpdatePolicy
ButtonUpdatePolicyThe update policy.
pVisible
boolA boolean indicating if this button is visible.
pEnabled
boolA boolean indicating if this button is enabled.
pVisibleForModalForm
boolA boolean indicating if this button is visible when a modal form is shown (like the add new record form).
pEnabledForModalForm
boolA boolean indicating if this button is enabled when a modal form is shown (like the add new record form).
pConfirmationQuestion
stringA string to ask the user for confirmation before executing the script for this button.
pTag
stringA tag for programming purposes.
Returns
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
clsStringThe clsString object that will contain the rendered html
pModalFormShown
objectA boolean indicating a modal form is shown.
pDefaultClassName
stringAn 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
intThe 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
Remove(object)
This method removes a button by index.
public void Remove(object pIndex)
Parameters
pIndex
objectThe 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()