JqxColorPicker: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:
</pre>
</pre>


==== change (JavaScript) ====
Change picker from hue or saturation mode:
<pre>
<pre>
JavaScript
     $("#ColorPicker1").jqxColorPicker({ colorMode: "hue" });
$('#Rating1').bind('change', function (event)
    {
      var curValue= event.value;
      alert(curValue);
     }); 
End JavaScript
 
</pre>
 
=== Functions ===
 
==== Disable Rating ====
<pre>
Rem disable rating
Function Button1_onclick()
  $("#Rating1").jqxRating({disabled:True})
End Function
</pre>
 
==== Enable Rating ====
 
<pre>
Rem enable rating
Function Button2_onclick()
  $("#Rating1").jqxRating({disabled:False})
End Function
</pre>
 
==== Set Rating Value ====
<pre>
Rem Set rating value 5*
Function Button3_onclick()
  $("#Rating1").jqxRating({value:5})
End Function
</pre>
 
==== Get Rating Value ====
<pre>
Rem Get rating value
Function Button4_onclick()
  Dim curValue
  curValue = $("#Rating1").jqxRating("value")
  MsgBox "Current Value is : " & curValue
End Function


    $("#ColorPicker1").jqxColorPicker({ colorMode: "saturation" });
</pre>
</pre>



Revision as of 14:10, 17 May 2013

Description

The ColorPicker control lets you easily select a color. It is based on the jqWidgets jqxColorPicker widget.

Properties and Methods

See the complete documentation at jqWidget's site: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxColorPicker/jquery-colorpicker-getting-started.htm

Example

Events

oncolorchange (BASIC)

Function ColorPicker1_oncolorchange()
  color=$("#ColorPicker1").jqxColorPicker("getColor")
  TextBox1.text=RGB(color.r, color.g, color.b)
End Function

Change picker from hue or saturation mode:

    $("#ColorPicker1").jqxColorPicker({ colorMode: "hue" });

    $("#ColorPicker1").jqxColorPicker({ colorMode: "saturation" });

Output

See above.