TreeGadget redraw problem... any ideas?

Mac OSX specific forum
User avatar
kenmo
Addict
Addict
Posts: 2081
Joined: Tue Dec 23, 2003 3:54 am

TreeGadget redraw problem... any ideas?

Post by kenmo »

I have a GUI/gadget problem with a Windows PB project I'm converting to Mac. I think it's a PB bug, but unfortunately I have not yet been able to recreate it in a small example code... only in my program which is over 10k lines. Normally I wouldn't post without an example code (and I will keep trying) but I am stuck so I thought I would ask here....

My problem seems to be a gadget not redrawing. I dynamically create and fill some TreeGadgets and they "work" (I can scroll it, click and select items) but the item texts are invisible! The strange part is, when the window loses focus (I click Finder or anything else) the TreeGadget text instantly becomes visible (standard black on white background) so I know the item texts were set correctly and not blank (also I checked with GetGadgetItemText).

Now, to make it more complicated.... these TreeGadgets are inside a PanelGadget, which is inside a SplitterGadget...... I don't know which of these three levels of gadgets is causing this weird problem.

So to summarize, I fill a TreeGadget and it works fine except the text is invisible until the window loses focus. Something must be triggering a redraw or re-coloring or something. Has anyone else had this problem?? Is there a way I could force a gadget redraw with CocoaMessage() maybe?

Thanks for any help, I'm stuck and this is a critical GUI problem for me :(




EDIT -- I narrowed it down to some example code and posted a bug report: http://www.purebasic.fr/english/viewtop ... 24&t=55361

This thread can be deleted now...