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

Remove dotted indication in Tlistbox

49 views
Skip to first unread message

Tom de Neef

unread,
Oct 5, 2008, 9:03:57 AM10/5/08
to
This group still active ?

When I start a Tlistbox with listbox.items.assign(stringlist), none of the
lines has any marking.
When I click a line, it gets grayed and the itemindex will be updated.
If I now set listbox.itemindex:=-1; the graying of the line is removed but
there is still a dotted border around the previously grayed text.
Is there a way to get rid of that dotted indication as well?

TIA, Tom


Marco van de Voort

unread,
Oct 5, 2008, 10:29:47 AM10/5/08
to
On 2008-10-05, Tom de Neef <tde...@qolor.nl> wrote:
> This group still active ?

It is a bit silent yes.

It's probably the focus (the item that will get the input e.g. from the
keyboard). Give some other component (e.g. a button) the focus.

I can't really inspect the possible options, but search the tlistbox
definition (and/or its ancestors) for killfocus or removefocus or so.

Tom de Neef

unread,
Oct 5, 2008, 11:35:13 AM10/5/08
to
"Marco van de Voort" <mar...@stack.nl> wrote:
>> This group still active ?
>
> It is a bit silent yes.
>
>> When I start a Tlistbox with listbox.items.assign(stringlist), none of
>> the
>> lines has any marking.
>> When I click a line, it gets grayed and the itemindex will be updated.
>> If I now set listbox.itemindex:=-1; the graying of the line is removed
>> but
>> there is still a dotted border around the previously grayed text.
>> Is there a way to get rid of that dotted indication as well?
>
> It's probably the focus (the item that will get the input e.g. from the
> keyboard). Give some other component (e.g. a button) the focus.
>

On the dot !
Thank you.
Tom


Hans-Peter Diettrich

unread,
Oct 5, 2008, 10:09:12 AM10/5/08
to
Tom de Neef schrieb:

> When I click a line, it gets grayed and the itemindex will be updated.
> If I now set listbox.itemindex:=-1; the graying of the line is removed but
> there is still a dotted border around the previously grayed text.
> Is there a way to get rid of that dotted indication as well?

IMO the dotted rectangle is the focus indicator. Move the focus to
another control, and it goes away.

DoDi

MikeB

unread,
Oct 5, 2008, 1:14:29 PM10/5/08
to
Tom etal,

http://dn.codegear.com/article/38435

The above Codegear link will direct you to the Embarcadero NGs. I think you
can get them up in your newsreader, but you can't post until you join/register
with Embarcadero. You don't have to own any product, but you have to join.

If you were already a Borland registered user, you can use your existing
username on the Embarcadero Servers.

You will find Team B at:
embarcadero.public.delphi.language.delphi.general
embarcadero.public.delphi.language.delphi.win32

I am sure there are others, but those are the only two I am lurking in these
days...

Good Luck.

"Tom de Neef" <tde...@qolor.nl> wrote in message
news:48e8bb3e$0$187$e4fe...@news.xs4all.nl...

Jamie

unread,
Oct 5, 2008, 3:20:21 PM10/5/08
to
Try playing with owner draw for special operations.
With that, You'll need to do your own drawing of
each item including the focus box.

http://webpages.charter.net/jamie_5"

0 new messages