Other B4J Colorpicker control

Discussion in 'Android Questions' started by touchsquid, Feb 28, 2015.

  1. touchsquid

    touchsquid Active Member Licensed User

    In the Java layout designer there is a colorpicker control. When I use it in a layout it works, but the "generate members" dialog does not show any event for color changed. I tried MouseClicked but that happens BEFORE the color change.

    I am able to use the FocusChanged event to get the color value(using JavaObject) but that only happens if the user clicks another button. Any idea how to get the color change event?

  2. touchsquid

    touchsquid Active Member Licensed User

    Got it working:
    Dim CP As JavaObject = FColorChoice 'the colorpicker control ID
            Dim E As Object = CP.CreateEventFromUI("javafx.event.EventHandler","FColorChoice",Null)
    Sub FcolorChoice_Event(MethodName As String,Args() As Object)
    Dim JO As JavaObject = FColorChoice
    Dim colorvalue As String = JO.RunMethod("getValue"Null)   
    End Sub
  3. Erel

    Erel Administrator Staff Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice