ASP.NET 3.5 and above only

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

Obout.Ajax.UI.HTMLEditor.Popups.PopupToggleButton class

 Inheritance Hierarchy

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

Toggle button with styled background image for use inside popups.

Click on this button toggles the inner text of the button.

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 .
Default 0.
propertyname string. Gets the name of the button. (Inherited from PopupCommonButton.)
propertytext string. Gets the current text inside the 'box' button. (Inherited from PopupBGIButton.)
propertytextCouple string overridable. Gets or sets the '/' character separated two text values.
Click on this button toggles the inner text of the button between these two values.
Example "px/%".
propertytoolTip string. Gets or sets the tooltip of the button. (Inherited from PopupCommonButton.)
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 toggle, you call the add_toggle or remove_toggle methods:
Type.registerNamespace("CustomPopups");

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

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

Events

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

"I wanted to say this is probably the best set of tools I have ever worked with, but the fact that you guys answer questions is phenomenal. I recommend your stuff to every developer I talk to. "

Karl Wilkens
Multiweb Communications, Inc.

Random testimonial   All testimonials