Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Posts
    346

    CheckBox Help Again!

    1. If box checked change label color red and run script
    2. If not checked undo and change color to blue

    I want to have multiple checkbox and was trying to find any easy way to do the color change globally.

    Global code and checkbox code.

    I got this to work except once checked it goes to disabled. Not sure why! Can someone tell me what I did wrong? Thanks
    Attached Files

  2. #2
    Join Date
    Aug 2003
    Posts
    2,427
    There's some quick and dirty example stuff in there that I recognise

    Change the global function code to -

    Code:
    function toggle()
    tProperties = CheckBox.GetProperties("CheckBox"..x);
    if tProperties.Checked == true then
    tProperties.ColorNormal = Math.HexColorToNumber("FF0000");
    else
    tProperties.ColorNormal = Math.HexColorToNumber("0000FF");
    end
    
    CheckBox.SetProperties("CheckBox"..x, tProperties);
    end
    It's really important to look through code and fully understand what and how each line does what it does - the function was setting the checkbox disabled.

  3. #3
    Join Date
    Feb 2006
    Posts
    346
    Thanks that works with a small problem. When you mouse over the text, it changes colors. Why is that and how can we fix? Thanks again

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    Yes - look at the properties of the checkbox. The highlight colour is set there. The code I posted earlier only deals with the colour for the normal state.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts