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
pIndexobjectThe 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
pNamestringA unique name for programming purposes.
pCaptionHtmlTCstringThe caption of the button. Can contain HTML.
pExplanationTCstringAn explanation to show with a mouse-over
pActionScriptstringThe script-expression to evaluate when this button is clicked.
pClassNamestringAn optional additional css class that is added to the html for this text button.
pUpdatePolicyButtonUpdatePolicyThe update policy.
pVisibleboolA boolean indicating if this button is visible.
pEnabledboolA boolean indicating if this button is enabled.
pVisibleForModalFormboolA boolean indicating if this button is visible when a modal form is shown (like the add new record form).
pEnabledForModalFormboolA boolean indicating if this button is enabled when a modal form is shown (like the add new record form).
pConfirmationQuestionstringA string to ask the user for confirmation before executing the script for this button.
pTagstringA 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
pResultHTMLclsStringThe clsString object that will contain the rendered html
pModalFormShownobjectA boolean indicating a modal form is shown.
pDefaultClassNamestringAn optional default css class name to use.
GetButtonByNumber(int)
This method returns the button by the internal ButtonNumber
public TextButton GetButtonByNumber(int pButtonNumber)
  Parameters
pButtonNumberintThe 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
pIndexobjectThe 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()