Cabbage Logo
Back to Cabbage Site

Redefining fontcolour() behavior bug? (nope! just my mistake)

As you already know Rory (and much to your frustration, I’m sure), most of my GUI layout style is managed using macros.

My most recent macro addition is a very straight-forward:

#define REINIT_TEXT fontcolour(205,50,50,255),

The idea is any gui control that would cause an instrument re-init would get this macro appended at the end, so that it’s text is red instead of the color already set by it’s other macro.

What I’m seeing tho is not all widgets behave the same when this happens. For example, it appears to work fine for a combobox or a label, but it does not work for an rslider.

I didn’t extensively test all widget types yet, but I’d be glad to if it would help. I figured I’d ask first before I put too much time into it tho, just in case this was another of those “bad cabbaging” behaviors :wink:

rslider’s have to font attributes for colours, One is textcolour(), which sets the text of the label, the other, fontcolour, sets the text of the editable font you see when typing a value into the rslider’s text field. Try textcolour() instead of fontcolour. I know it’s kind of confusing, but it’s been like this since the start, it would break a lot of things if I changed it now.

Gah! Thanks again, Rory!

I don’t think I’ve used the valuetextbox() on any of my sliders (tho I probably should on a few)… so I completely forgot it even existed.

That’s exactly what’s going on, and everything now appears to be working as it should. Thanks!