Hiding Gadgets Quickly

BlitzPlus Forums/BlitzPlus Programming/Hiding Gadgets Quickly

bushsolo(Posted 2003) [#1]
At the start of my program I want to create a TextArea then hide it, this text area will only be shown when certain parts of the program are accessed. When the program runs you can see the text area being created and then hudden from view.

Is there any way to stop this TextArea from showing when it is created?


CSVtextError = CreateTextArea(8,30,775,500,canvas)
HideGadget CSVtextError


CS_TBL(Posted 2003) [#2]
yeah.. I wish to know the answer too..

What I do now is make a function that dynamicly creates such things, and frees the gadget when I leave the function..


okee(Posted 2003) [#3]
You could just create it when it's first required by the program.

or

Create the main window, hide it, then create all the gadgets that you want and then show the window.

okee


Shagwana(Posted 2003) [#4]
how about creating it at a negative location - then moving it into view when its needed?


bushsolo(Posted 2003) [#5]
I will need to create and destroy this textarea several times during the program so I can't hide the window every time.

I create the textarea then add several thousand lines of text to it. This takes a while if it is shown but is quick if it is hidden.

So a text area will flash up on the screen disappear then come back 10 seconds later, doesn't seem pro.

Someone must have a solution?


TeraBit(Posted 2003) [#6]
As Shagwana says, you should create the Textarea at a weird (off screen) location (like -1000,-1000) then use SetGadgetShape to bring it to where you want it when you are ready.


bushsolo(Posted 2003) [#7]
Thanks Shagwana, you posted while I was in the process of posting.