ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Client side

Obout.Ajax.UI.HTMLEditor.Popups.PopupUnitToggle class

 Inheritance Hierarchy

It is a client-side representation of the server-side Obout.Ajax.UI.HTMLEditor.Popups.PopupUnitToggle class.

This button toggles the inner text of the button between "px" and "%" size units.

Note Note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as toolTip, you call the get_toolTip or set_toolTip methods:
var _id = buttonObject.get_id();
...
buttonObject.set_toolTip("It is my button");

Properties

Name Description
propertyelement string. Gets the DOM element that the current Control instance is associated with. (Inherited from Sys.UI.Control.)
propertyid string. Gets the identifier for the current Control object. The default is the id value of the associated Sys.UI.DomElement object. (Inherited from Sys.UI.Control.)
propertyinitIndex number overridable. Gets or sets the index of initial value (shown in the button) in the TextCouple . (Inherited from PopupToggleButton.)
Default 0.
propertyname string. Gets the name of the button. (Inherited from PopupCommonButton.)
propertytext string. Gets the current text inside the 'box' button: "px" or "%" (depends on the initIndex value). (Inherited from PopupBGIButton.)
propertytextCouple string overridable. Gets the '/' character separated two text values: "px/%". (Inherited from PopupToggleButton.)
Click on this button toggles the inner text of the button between these two values.
propertytoolTip string. Gets or sets the tooltip of the button. (Inherited from PopupCommonButton.)
propertyunit string. Gets or sets the current size unit ("px" or "%").
Note Note
To add or remove handler functions for client API events, you must call methods that are named with the add_ and remove_ prefixes. For example, to add or remove a handler function for an event such as toggleUnit, you call the add_toggleUnit or remove_toggleUnit methods:
Type.registerNamespace("CustomPopups");

CustomPopups.MyPopup = function(element) {
   CustomPopups.MyPopup.initializeBase(this, [element]);
   this.toggleUnitHandler$delegate = Function.createDelegate(this, this.toggleUnitHandler);
}

CustomPopups.MyPopup.prototype = {
   ...
   toggleUnitHandler: function (sender, args) {
   },
   preOpen: function(contentWindow) {
      CustomPopups.MyPopup.callBaseMethod (this, "preOpen", [contentWindow]);
      var buttonObject = contentWindow.popupMediator.getHandler("widthUnitToggle");
      buttonObject.add_toggleUnit(this.toggleUnitHandler$delegate);
   },
   ok: function(contentWindow) {
      CustomPopups.MyPopup.callBaseMethod (this, "ok", [contentWindow]);
      var buttonObject = contentWindow.popupMediator.getHandler("widthUnitToggle");
      buttonObject.remove_toggleUnit(this.toggleUnitHandler$delegate);
   },
   cancel: function(contentWindow) {
      CustomPopups.MyPopup.callBaseMethod (this, "cancel", [contentWindow]);
      var buttonObject = contentWindow.popupMediator.getHandler("widthUnitToggle");
      buttonObject.remove_toggleUnit(this.toggleUnitHandler$delegate);
   },
   ...
}
CustomPopups.MyPopup.registerClass("CustomPopups.MyPopup",
                                                    Obout.Ajax.UI.HTMLEditor.Popups.OkCancelPopup);

Events

Name Description
propertytoggleUnit Raised when the text inside the button was toggled.
Event's argument has type Obout.Ajax.UI.HTMLEditor.Popups.UnitChangedArgs.

"Thanks so much! I will recommend Obout to ANYONE serious about making an impact in the simplicity and flow of their asp.net pages. There is just no comparing these controls with the alternatives! Better in every way! "

Daniel Burgess
Heidelberg Distributing Company

Random testimonial   All testimonials