Page 1 of 1

HideGadget() troubles

Posted: Wed Aug 27, 2003 6:14 am
by Karbon
Are there any known problems using HideGadget(#Gadget, 1) with gadgets on a panel gadget?

I'm calling HideGadget() from inside a procedure and the gadgets seem to become disabled in that you can't click on them but you can still see them. It's really odd since I hide the gadget when the window opens, then show the gadget when a button is clicked and when I try to hide the gadget again when another button is clicked it behaves in the way described. If I switch to another tab and back then the gadget(s) are hidden...

Strrrrrrrange. Hopefully it's just something I'm doing wrong...

Posted: Wed Aug 27, 2003 11:48 am
by wcardoso
try to force a paint message to the container gadget, the panel in this case; after you process the hide command. :wink:

Posted: Wed Aug 27, 2003 5:15 pm
by Karbon
RedrawWindow_(WindowID(#Window_main), 0, 0, 7)

Seemed to do the trick... Is this a bug or just one of those Windows "features"?

Thanks!!!!

Posted: Wed Aug 27, 2003 7:42 pm
by plouf
i have this problem with 3.70 and i use SetGadgetState(#PanelGAdget,ActivePage)
propably its a ne feature :wink:

Posted: Wed Aug 27, 2003 8:25 pm
by Karbon
Ahh - good to know.. I have 3.72 so I guess the problem is still around..

Thanks for the help guys!

Posted: Thu Aug 28, 2003 1:03 pm
by wcardoso
I think the HideGadget command do not complete the job, you must to do it forcing the redraw of the container panel or the whole window. :(

Posted: Thu Aug 28, 2003 1:15 pm
by freak
To me, this sounds like a bug in PanelGadget

Timo

Posted: Thu Aug 28, 2003 8:04 pm
by Karbon
It does seem like a bug with the panel gadget - I don't see this happening when it's not on a panel. I'll try to post some code in bug reports to reproduce the problem..

Posted: Sat Aug 30, 2003 9:11 pm
by Le Soldat Inconnu
i have the same bug, but setgadgetstate is not a valid solution

because with imagegadget, when you resize this gadget, he don't refresh, and i don't find solution.

i test all this solutions :
resizewindow
rezizegadget(#panel, ....)
windowupdate_(windowid())
RedrawWindow_(GadgetID(#gadget),0,0,7)
but this way don't work

the way which works is
setgadgetstate(#panel, 1)
setgadgetstate(#panel, 0)
but it's not a good solution because it's cause a flashing of the window

excuse me for mistakes

bye

Posted: Sat Aug 30, 2003 9:12 pm
by Le Soldat Inconnu
it's a bug, nothing else :wink: