Board index » cppbuilder » How to hide click frame of BitBtn

How to hide click frame of BitBtn


2004-05-03 06:14:28 AM
cppbuilder92
Hi,
I would like to get rid of the click frame of BitBtn.When i
click it, i dont wanna see dotted line around the caption.How
to do that?
Eugene
 
 

Re:How to hide click frame of BitBtn

"Eugene" < XXXX@XXXXX.COM >wrote in message
Quote
I would like to get rid of the click frame of BitBtn.When
i click it, i dont wanna see dotted line around the caption.
How to do that?
You can't, unless you derive a new component and override the native drawing
code with your own manual drawing. Otherwise, just use a TSpeedButton
instead. It doesn't display the focus rectangle since it is not a windowed
control and thus can not receive input focus in the first place.
Gambit
 

Re:How to hide click frame of BitBtn

Hi Remy,
I always use SpeedButton but i want to place buttons over the
DbGrid component.So, when i place over it, speed buttons hides
back of DbGrid :) So, i try to hide the frame.Maybe it is
better to search a new button component for it.
Thanks for your answer.
Eugene
"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote

"Eugene" < XXXX@XXXXX.COM >wrote in message
news:409572c4$ XXXX@XXXXX.COM ...

>I would like to get rid of the click frame of BitBtn.When
>i click it, i dont wanna see dotted line around the caption.
>How to do that?

You can't, unless you derive a new component and override the native drawing
code with your own manual drawing. Otherwise, just use a TSpeedButton
instead. It doesn't display the focus rectangle since it is not a windowed
control and thus can not receive input focus in the first place.


Gambit


 

{smallsort}

Re:How to hide click frame of BitBtn

"Eugene" < XXXX@XXXXX.COM >wrote in message
Quote
I always use SpeedButton but i want to place buttons over
the DbGrid component.So, when i place over it, speed
buttons hides back of DbGrid :) So, i try to hide the frame.
Maybe it is better to search a new button component for it.
You could alternative just draw a button-like image onto the DbGrid directly
from inside the OnDrawColumnCell event using the DrawFrameControl() function
from the Win32 API. Use the OnMouse... events to keep track of when the
mouse is held down over a button image, so that you can adjust your drawing
accordingly. This way, you don't need any components at all.
Gambit
 

Re:How to hide click frame of BitBtn

Hmm, That's a good idea.Let me try :)
Eugene
"Remy Lebeau \(TeamB\)" < XXXX@XXXXX.COM >wrote:
Quote

"Eugene" < XXXX@XXXXX.COM >wrote in message
news:40966291$ XXXX@XXXXX.COM ...

>I always use SpeedButton but i want to place buttons over
>the DbGrid component.So, when i place over it, speed
>buttons hides back of DbGrid :) So, i try to hide the frame.
>Maybe it is better to search a new button component for it.

You could alternative just draw a button-like image onto the DbGrid directly
from inside the OnDrawColumnCell event using the DrawFrameControl() function
from the Win32 API. Use the OnMouse... events to keep track of when the
mouse is held down over a button image, so that you can adjust your drawing
accordingly. This way, you don't need any components at all.


Gambit