Recent

Author Topic: TSpeedButton in front of Tmemo impossible?  (Read 831 times)

torbente

  • Sr. Member
  • ****
  • Posts: 325
    • Noso Main Page
TSpeedButton in front of Tmemo impossible?
« on: January 19, 2021, 01:40:58 am »
I just found something very curious:

I dropped a TMemo to show some info, and on it upper rigth corner i try to place a TSpeedbutton to close it. The TMemo is always on top, so the button is not visible and you can not close the tmemo. I try many ways but was impossible: sending tmemo to back, bringing speedbutton to front, using the object inspector...

Then i try with a TButton. It worked as expected, IN FRONT of the Tmemo.

Why the TSpeedButton can not appear in front of a tmemo?
Noso Cryptocurrency Main Developer
https://github.com/DevTeamNoso/NosoWallet

jamie

  • Hero Member
  • *****
  • Posts: 6091
Re: TSpeedButton in front of Tmemo impossible?
« Reply #1 on: January 19, 2021, 02:38:45 am »
Speedbutton is a TGraphicsControl and depends highly on a parent to accept it..
The TMemo in windows has its own window and does not play well to offer up a canvas !

 Not saying it can't be done because it can be with a little trickery


 You need to use controls that are  hosted from a TWinControl which has handles.

 If you want to use a Tspeedbutton still then place it inside a TPanel . have the Panel on top of the memo.
The only true wisdom is knowing you know nothing

torbente

  • Sr. Member
  • ****
  • Posts: 325
    • Noso Main Page
Re: TSpeedButton in front of Tmemo impossible?
« Reply #2 on: January 19, 2021, 02:53:15 am »
Good to know that, thanks a lot.
A bitbutton can be used to0, and is more graphic friendly  ::)
Noso Cryptocurrency Main Developer
https://github.com/DevTeamNoso/NosoWallet

 

TinyPortal © 2005-2018