Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Is it just me, or is it not possible to set the forecolour of a checkbox?

I tried for like 3 hours to set the forecolor of a checkbox, and then I gave up. But surely I am doing something wrong? Surely it is possible to set the colour of a checkbox?

As you can see, I set the colour to red in the form designer:




But the colour goes to black when I run the form:

Comments

  • I suspect promoted events are at play.
    I'd even have a stab in the dark at the routine name being something like oryx_promoted_events and within the 'create' logic, the 'FORECOLOR' property of certain control types is being set in an attempt to maintain application consistency.
  • I think this is a Windows theme issue. This is often why the controls in the Form Designer can look different than in runtime. Have you tried setting the FORECOLOR property? I am doubtful it will work, but it can't hurt.
  • edited May 2021
    I tried setting the property, also after the create event, and it didn't work. So that rules out promoted events. I will just use another control...perhaps a button that toggles between two states or something... Or i could just use static text and a checkbox with no text...but then they can't click on the text to interact with the checkbox, which is annoying.
  • As I said, I'm pretty sure this is Windows themes controlling the look of a standard Windows control. You might be able to get what you want using the SRP Button control, which supports a toggle state.
  • ok, i will give that a try...

    thanks
Sign In or Register to comment.