Quiz: what is the difference between these two PushButtons?


One difference is the width:
a. the White OK is 80 pixels wide
b. the Black OK is 100 pixels wide

The moment in time when I add them onto my window is also different, of course.

Now the real question:
Why do I have a White OK and a Black OK ?

Hint: the buttons background is clear.

No idea. Enlighten us, @Emile_Schwarz :slight_smile:

The subject line differs froim the explanation text.

The question can be: How do you change the color of the button’s OK (Text) in the IDE ?

Oh, then my answer is: it depends…on the button’s super class. I.e. DesktopBevelButton has handles in the IDE to change background and text color while DesktopButton has not.

No, Super is not the answer.

Another Hint: I do not changed the color. This is a Bug in Xojo’s IDE.

Both are PushButtons.

Ok. Did you file an issue?

I stopped doing that long time ago, so long that I forget when it was.

To paraphrase the late John Lennon “I don’t believe in bug reports.”

1 Like

“There can be only one!..” default button per window.

1 Like

What version of Xojo?
Windows or Mac?

Yes, I was waiting for this answer. But this is not THE answer.

It is ion the same window, but can be in two different windows: same behavior. But I needed to do two screen shots in that case…

At last, I forgot to remove it when I resume the work on that project … :ukraine:

Version of Xojo: I think all versions…

Mac because no VirtualBox on M1…

Testing that is easy: drop two times a default PushButton and… arghhhh I nearly gave the solution…

Solution: tomorrow because I have to left now.

I was able to reproduce it like this:

  • drop two default PushButton
  • change super to DesktopBevelButton to one of them
  • the other will change the OK from white to black
  • replace the changed PushButton with a new one with OK in white

This could be different from what you are doing.

Edit: easier just change the Default from True to False and back to True
blackOK.2022-07-28 08_37_18

Then, how do you expect the issue will be fixed ?

and be aware of windows 11 …

Dark mode works correctly:
ezgif.com-gif-maker (8)

Case #69525 created

Here’s the answer:

Change its width, even 81 pixels width (instead of the default 80 px) do the trick.

Yes, the displayed buttons widths are 80 and 100 pixels, because the one I had was 100 pixels and the default value is 80 pixels.

Of course, it does not behave the same once you run or build the application.

Thank you for your answers.

That is why I used the Off-Topic channel, not the Bug…

I can’t replicate this here. I modified the width both by typing the new width and by using the mouse. The OK is still white.

Maybe Xojo/OS version specific?