B4J Question Checkbox Value

Discussion in 'B4J Questions' started by ElliotHC, Aug 8, 2019.

  1. ElliotHC

    ElliotHC Active Member Licensed User

    I have a save config routine which looks at the state of some checkboxes along with some textfield values and saves them to a file.

    Text is saving fine but for some reason I can't seem to get the checkbox value.. It always returns false even when it's ticked.

    Elsewhere in my code I'm using an if statement e.g.

    If Checkbox1.checked = True then
    End If
    This is working fine.

    But when I do this

    Writer.Writeline("CheckBox Value," & CheckBox1.Checked)
    I always write false
  2. ElliotHC

    ElliotHC Active Member Licensed User

    I was initializing them :rolleyes:
  3. Harris

    Harris Well-Known Member Licensed User

    So this means you Solved it? - because you were initing it? Just guessing - as others will do...
    ElliotHC likes this.
  4. ThRuST

    ThRuST Well-Known Member Licensed User

    @ElliotHC You never mentioned how you load your settings to set the checkbox state. It is recommended that you load the actual value on a new line or else the remark will be used as the value. That's why it always remains False. Always provide enough information so that others can understand what you're doing :)
  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