B4A Library [B4X] [XUI] AS CheckBoxAdvanced

This is a CheckBox library that can be displayed together with text. So you can now add checkboxes and text them even faster.
If you want a standalone checkbox, then have a look at the AS_CheckBox library.

I spend a lot of time in creating views, like this and to create a high quality view cost a lot of time. If you want to support me and further views, then you can do it here by Paypal or with a coffee. :)


(41) mage.png
AS_CheckBoxAdvanced.gif

How the text should look like, you decide completely in the designer, under the "Label properties:
1689447206582.png

or in the code:
B4X:
AS_CheckboxAdvanced1.TextLabel.TextColor = xui.Color_Red

AS_CheckBoxAdvanced
Author: Alexander Stolte
Version: 2.00
  • AS_CheckboxAdvanced
    • Events:
      • CheckedChange (Checked As Boolean)
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Base_Resize (Width As Double, Height As Double)
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • Initialize (Callback As Object, EventName As String)
      • Refresh
      • SetIcon (icon As String, isfontawesome As Boolean)
    • Properties:
      • BorderCornerRadius As Int [write only]
      • BorderWidth As Int [write only]
      • CheckBoxLabel As B4XView [read only]
      • CheckBoxWidthHeight As Float
        Call Refresh if you change this value
      • Checked As Boolean
      • CheckedAnimated As Boolean [write only]
      • CheckedBackgroundColor As Int [write only]
      • DisabledBackgroundColor As Int
      • DisabledIconColor As Int
      • Enabled As Boolean
      • IconColor As Int
      • isEvent As Boolean
      • isFillUncheckedBackgroundColor As Boolean
      • isFontAswesome As Boolean
      • isHaptic As Boolean
      • isround As Boolean
      • Text As String
      • TextLabel As B4XView [read only]
      • Theme As AS_CheckBoxAdvanced_Theme [write only]
      • Theme_Dark As AS_CheckBoxAdvanced_Theme [read only]
      • Theme_Light As AS_CheckBoxAdvanced_Theme [read only]
      • UncheckedBackgroundColor As Int
      • UncheckedIconColor As Int

Changelog
  • 1.00
    • Release
  • 1.01
    • The checkbox is now also toggled when you click on the text
  • 1.02
    • Add Designer Property CheckBox2TextGap - Gap between checkbox and text
      • Default: 10dip
  • 1.03
    • BugFixes and Improvements
  • 2.00
    • Add get CheckBoxLabel - The checkbox label
    • Add Designer Property FillUncheckedBackgroundColor
    • Add Designer Property UncheckedBackgroundColor
    • Add Designer Property UncheckedIconColor
    • Add Designer Property Round
      • Default: False
    • Add set Theme
    • Add get Theme_Dark
    • Add get Theme_Light
    • Add Designer Property ThemeChangeTransition
      • Default: None
Have Fun :)
 

Attachments

  • AS CheckboxAdvanced Example.zip
    178.1 KB · Views: 355
  • AS_CheckboxAdvanced.b4xlib
    4 KB · Views: 23
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.00
    • Add get CheckBoxLabel - The checkbox label
    • Add Designer Property FillUncheckedBackgroundColor
    • Add Designer Property UncheckedBackgroundColor
    • Add Designer Property UncheckedIconColor
    • Add Designer Property Round
      • Default: False
    • Add set Theme
    • Add get Theme_Dark
    • Add get Theme_Light
    • Add Designer Property ThemeChangeTransition
      • Default: None
You can read more about this update here:
 
Top