B4J Library jToggleSwitch V1.0.0

Discussion in 'B4J Libraries & Classes' started by DonManfred, Jan 25, 2016.

  1. DonManfred

    DonManfred Expert Licensed User

    jToggleSwitch
    Author:
    DonManfred (wrapper)
    Version: 1
    • ToggleSwitch
      Events:
      • selectedChanged (selected As Boolean)
      Fields:
      • ba As BA
      Methods:
      • DesignerCreateView (base As ConcretePaneWrapper, label As LabelWrapper, args As Map)
      • Initialize (arg1 As String)
      • IsInitialized As Boolean
      • RemoveNodeFromParent
      • RequestFocus
      • SetAlphaAnimated (arg0 As Int, arg1 As Double)
      • SetLayoutAnimated (arg0 As Int, arg1 As Double, arg2 As Double, arg3 As Double, arg4 As Double)
      • SetSize (arg0 As Double, arg1 As Double)
      • Snapshot As ImageWrapper
      • Snapshot2 (arg0 As Paint) As ImageWrapper
      • isWrapText As Boolean
      Properties:
      • Alpha As Double
      • ContextMenu As ContextMenuWrapper
      • Enabled As Boolean
      • Height As Double [read only]
      • Id As String
      • LayoutX As Double [write only]
      • LayoutY As Double [write only]
      • Left As Double
      • MouseCursor As Cursor
      • PrefHeight As Double
      • PrefWidth As Double
      • Selected As Boolean
      • Style As String
      • StyleClass As String [write only]
      • StyleClasses As List [read only]
      • Tag As Object
      • Text As String
        Gets or sets the default label text value.
      • TooltipText As String
      • Top As Double
      • Visible As Boolean
      • Width As Double [read only]
      • WrapText As Boolean [write only]

    [​IMG]


    If you want to donate for my work building the wrapper you can do it here: [​IMG]
     

    Attached Files:

    jmon, Suntzu, Informatix and 15 others like this.
  2. Johan Schoeman

    Johan Schoeman Expert Licensed User

  3. thader2012

    thader2012 Member Licensed User

    Fantastic!!!
     
  4. Peter Simpson

    Peter Simpson Expert Licensed User

    That's great Manfred, cheers ;)
     
  5. ShaneG30

    ShaneG30 Well-Known Member Licensed User

    Wow, thanks for the custom control. This is an excellent alternative to the boring CheckBox.
     
    DonManfred likes this.
  6. Siam

    Siam Active Member Licensed User

    Hi,

    if i run the example i get the following messages in the Log window:

    greets
    andy
     
  7. DonManfred

    DonManfred Expert Licensed User

    You can ignore them
     
  8. Siam

    Siam Active Member Licensed User

    okay
     
  9. ShaneG30

    ShaneG30 Well-Known Member Licensed User

    @DonManfred - I have a similar problem.

     
  10. Siam

    Siam Active Member Licensed User

    Hello,

    i think there is something wrog :oops: i have placed one togglebutton with the designer to my screen and play a while with the button
    after some klicks, is the button graphic no longer correct see the image

    togglebutton.png

    these messages i will get at starting my app:

     
    Last edited: Feb 27, 2016
  11. Erel

    Erel Administrator Staff Member Licensed User

    You can ignore these messages.
     
  12. Siam

    Siam Active Member Licensed User

    Ok it will be ignored ;) i have postet this messages maybe to help to find the problem with the image of the toggle view. See the image on my last posting. The first image is on and the second is the same image in off state.
     
  13. Suntzu

    Suntzu Member Licensed User

    Hi DonManfred, thank you for this library. Is it possible to put the text on the right side of the button?
     
  14. Pitag

    Pitag New Member Licensed User

    Maybe a bug? when i generate the event with the Generate Members function in the visual designer, the new sub is named Toggleswitch1_checkedChanged(checked as boolean). But with this sub, when you change the state of the Toggleswitch no event is raised. In the example i found the correct name of the sub: Toggleswitch1_checkedChange(checked as boolean), without the d letter in the word Change.
    In the first post the event is named 'selectedChanged(selected as boolean)
     
  15. Mashiane

    Mashiane Expert Licensed User

    Hi @DonManfred , when placed inside a pane, the switch sits on the far right of the panel. Any ideas on how to fix it? Thanks
     
  16. ThRuST

    ThRuST Well-Known Member Licensed User

    @DonManfred Very nice indeed, but can you please update it to work with Java v11 or later please? However I have not tested it with Java v11.
    Someone please comment this if you're tried that combo.

    Here's what I found
    It works fine with Java JDK v1.8.0.191
    However with Java JDK v9.0.4 it generates this in the IDE log

    B4J v6.51 was used.
     
    Last edited: Nov 6, 2018
  17. DonManfred

    DonManfred Expert Licensed User

    this is unlikely to happen as i wrote the wrap years ago and i lost all of my old sources last year.
     
  18. ThRuST

    ThRuST Well-Known Member Licensed User

    I see. But you might make a new version with stripped down methods and properties with only the most fundamental stuff in it.
    For my use I would like just the basic switch mechanism with CSS support and check if it's set left or right, that will do it.
    From what I have seen it's one of the most obvious controls so you might have something cooking for us :)
     
  19. DonManfred

    DonManfred Expert Licensed User

    Learn java and do a new wrapper by yourself.

    It is unlikely i do another one for this.
     
  20. ThRuST

    ThRuST Well-Known Member Licensed User

    Thanks @DonManfred I wish I was just as smart as you, but I'm stupid enough to stay foolish and hungry :D
     
Loading...
  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