AlertWindow buttons

We already have functions to access any added TextEditor, ComboBox and custom Components - any chance of providing similar helpers to access the TextButtons?

I currently do it locally by looping over the children manually until I find a TextButton with the required name; this is so that I can call setEnabled() upon it if the user-supplied information is incomplete/invalid. This works perfectly well, but it’s a little clumsy to actually get hold of the button!

UNLESS OF COURSE, I am typically missing something obvious :slight_smile:

(I’ve been avoiding adding anything to that class because the whole class needs a damned-good spring cleaning…)

I guess I never provided accessors for the buttons because I couldn’t really think why you’d need to access them, but I’ve got no actual objection to adding some.

Speaking of buttons being added to AlertWindows (and other controls, too), what do you think about adding a copyAllExplicitColours that copies the colours set to the AlertWindow to the controls being added (Buttons, TextEditors and so on)?

I don’t think that’s necessary - if you want to change the colours in an alertwindow, you could just give it a customised lookandfeel, and those colours would then be inherited by all its buttons, right?

Good point, I’ll go back having a look at why I needed this in the first place. Maybe I’ll sort this out with look and feels trickery :slight_smile: