Recent

Author Topic: [SOLVED] Making Objects dissapear.  (Read 2651 times)

Grandpa

  • Newbie
  • Posts: 2
[SOLVED] Making Objects dissapear.
« on: September 26, 2016, 07:56:45 pm »
I need a TEdit to disappear and reappear after button clicks, what command would i use? I really cant find anything related.
« Last Edit: September 26, 2016, 08:19:43 pm by Grandpa »

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Making Objects dissapear.
« Reply #1 on: September 26, 2016, 08:09:40 pm »
Did you try ;

edit1.Visible := not edit1.Visible;


molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Making Objects dissapear.
« Reply #2 on: September 26, 2016, 08:14:55 pm »
The documentation on TEdit shows it has a property named visible.

If you click on that link you end up here.

and says:
Quote
Allows to show or hide the control, and all of its children.
...
Visible is set to True by Show, or to False by Hide. Calling these methods is equivalent to setting the Visible property.
So either set this propery or use the show/hide methods.

Grandpa

  • Newbie
  • Posts: 2
Re: Making Objects dissapear.
« Reply #3 on: September 26, 2016, 08:18:41 pm »
Did you try ;

edit1.Visible := not edit1.Visible;

Thank you, that was exactly what i needed! Wasn't aware of the Visible property for objects.

 

TinyPortal © 2005-2018