Delete String/Text Gadget

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Saint.

Hi,
How can I delete a Text or String Gadget from my Window? Is there any command?
CU
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
How can I delete a Text or String Gadget from my Window? Is there any command?
There's no built-in command, but if you're using the Windows version of PureBasic
then you can hide any gadget with the ShowWindow_() API. To do it, you must
create your gadget with a leading handle like this:

r=StringGadget(...

Then, to hide it, use this code:

ShowWindow_(r,#SW_HIDE)

Note that you can use #SW_SHOW to re-show it again later, if you wish.


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

You can use FreeGadget(#Gadget).

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
You can use FreeGadget(#Gadget).
Oops, I totally overlooked this command!

Fred, will a future update support a command like GadgetVisible?


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Why not..


Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
Why not..
Damn you're great!

I used to request stuff to Microsoft for Visual Basic, but they NEVER listened.
They even have a "wish" E-Mail address but nothing ever comes of using it, no
matter how many people try (and believe me, a lot of us have).

So it's fantastic to have such dedication to a product like you do.


PB - Registered PureBasic Coder
Post Reply