B4J Library [ABMaterial]: MashColorPicker

Hi there

This MashPlugIns MashColorPicker enables one to pick a color from predefined color png and you can also specific the image you want to pick the color from.

MashColoPicker.gif


In the example we have 3 examples of picking a color from an image wheel, then from eric.png and also firefix.png.

Code:
Dim mcp As MashColorPicker
    mcp.Initialize(page,"mcp","Eye Colour","","")
    page.Cell(3,1).AddComponent(mcp.ABMComp)
    
    Dim mcp1 As MashColorPicker
    mcp1.Initialize(page,"mcp1","Pick from FireFox","../images/firefox.png","")
    page.Cell(4,1).AddComponent(mcp1.ABMComp)
    
    Dim mcp2 As MashColorPicker
    mcp2.Initialize(page,"mcp2","Pick from Eric","../images/eric.png","")
    page.Cell(5,1).AddComponent(mcp2.ABMComp)

Just finalizing a few neat things about it...

This is just awesome!
 
Additional code..

To trap the color change event...

Code:
Sub mcp3_change(value As Map)
    Dim valuex As String = value.Get("value")    
Log(valuex)
End Sub

Where valuex is the hex value of the selected color.

You can also get and set the hex color like this..

Code:
Dim val As String = mcp3.GetColor

And to set one...

Code:
mcp3.SetColor("#FE4D4D")


Another color pallete added..

Code:
mcp3.Initialize(page,"mcp3","Pick from Most Colors","../images/most.png","")
    page.Cell(6,1).AddComponent(mcp3.ABMComp)

PickFromMost.png
 
Hi mashiane: MashDateDropper and MashDateDropper can Additional change DateDropper or DateDropper event code? Thank You
 
Dear Marshiane, this looks totally awesome. It's part of the ABMaterials package right? Your avatar image makes me hungry :)
 
Back
Top