Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding TabStop support to tSpeedButton

278 views
Skip to first unread message

Tobias Rapp

unread,
Mar 4, 2008, 10:04:47 AM3/4/08
to
Hello,

does anybody know a way to add tab-stop support for tSpeedButton
descendants (basically for tPngSpeedButton from PngComponents)? The goal
is to have a flat button that can get the input focus by pressing the
tab key. I searched for something like this on the net but could not
find anything appropriate...

Also tab-stop support for tToolButton descendants would be interesting.

I'm developing with Delphi 5 and Delphi 2006 so far.

Kind regards,
Tobias

Finn Tolderlund

unread,
Mar 4, 2008, 10:30:45 AM3/4/08
to

"Tobias Rapp" <t.rapp_...@noa-audio.com> skrev i meddelelsen
news:47cd...@newsgroups.borland.com...

> does anybody know a way to add tab-stop support for tSpeedButton
> descendants

That is simlpy not possible.
A TSpeedButton is not a windows control.
Only windows controls (descending from TWinControl) can receive focus.
You will need to use a control descending from TWinControl.
--
Finn Tolderlund

Remy Lebeau (TeamB)

unread,
Mar 4, 2008, 1:50:56 PM3/4/08
to

"Tobias Rapp" <t.rapp_...@noa-audio.com> wrote in message
news:47cd...@newsgroups.borland.com...

> does anybody know a way to add tab-stop support for tSpeedButton
> descendants (basically for tPngSpeedButton from PngComponents)?

TSpeedButton is a graphical control, not a windowed control, so it can't
handle tab stops as it can't receive input focus to begin with.

> The goal is to have a flat button that can get the input focus by
> pressing the tab key.

Then you can't use graphical control at all. You will have to adapt TButton
or TBitBtn instead. For my purposes, I took TBitBtn's source (TBitBtn is
just an owner-drawn TButton) and adapted a custom TPngButton for my
projects.

> Also tab-stop support for tToolButton descendants would be interesting.

That is also not possible, for the same reason - TToolButton is a graphical
control, not a windowed control.


Gambit


Tobias Rapp

unread,
Mar 6, 2008, 7:43:49 AM3/6/08
to
Remy Lebeau (TeamB) wrote:
> TSpeedButton is a graphical control, not a windowed control, so it can't
> handle tab stops as it can't receive input focus to begin with.
> [...]

>
>> Also tab-stop support for tToolButton descendants would be interesting.
>
> That is also not possible, for the same reason - TToolButton is a graphical
> control, not a windowed control.

I suspected that this would be the problem. Thanks for the answer.

/Tobias

0 new messages