Is it possible to switch off the visible cursor in a TListBox? I didn't find an option for that.
I wanted the TListBox to act as a log window that shows current (and recent) activity.
But the selection color makes the cursor line quite unreadable and it also makes no
sense to make one line special to the others.
Mailing lists / lazarus / 2011-03
Switch off curser in TListBox
6 messages · 5 people · –
- JJürgen Hestermann 2
- AAndreas Schneider 1
- HHans-Peter Diettrich 1
- Uu-boot 1
- WWilliam Oliveira Ferreira 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
whether you find an event that is thrown at the right time following
procedure works:
procedure ListboxSelectionRemove(AListBox: TListbox);
var
i: Integer;
begin
i:=0;
while i<AListBox.Count do begin
AListBox.Selected[i]:=false;
inc(i);
end;
end;Show quoted text 13 lines
Is it possible to switch off the visible cursor in a TListBox? I didn't find an option…
J?rgen Hestermann wrote 7 lines
Just switch to OwnerDraw mode and draw the items by yourself. Then you can just ignore the "Selected" case.
whether you find an event that is thrown at the right time following procedure works:…
Show quoted text 12 lines
Thanks for this example. I was hoping for some configuration switch to simply switch off the cursor.
It seems I have to "reprogram" many of the LCL routines when doing only slighty special things.
I thought the LCL existed just to to avoid digging into such details. But okay, it seems noone ever thought about switching off cursors in tables or coloring cells.
whether you find an event that is thrown at the right time following procedure works:…
I wanna make a suggestion:
procedure ListboxSelectionRemove(AListBox: TListbox);
var
i: Integer;
begin
i:=0;
AListBox.BeginUpdateBounds;;
while i<AListBox.Count do begin
AListBox.Selected[i]:=false;
inc(i);
end;
AListBox.EndUpdateBounds;
end;I think it'll gain some performance...
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o
2011/3/6 u-boot
Show quoted text 37 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110308/c0450a35/attachment-0001.html>
Thanks for this example. I was hoping for some configuration switch to simply switch off…
It seems I have to "reprogram" many of the LCL routines when doing only slighty special things.
When platform widgets (TWinControl descendants) are involved, they dictate the way they work.
I thought the LCL existed just to to avoid digging into such details.
You'll have to understand the default operation of every complex control, before you can know where to hook in. Currently I'm dealing with OwnerData listviews, and the LCL wrapper is a real mess :-(
But okay, it seems noone ever thought about switching off cursors in tables or coloring cells.
Many people have been thinking about customizing controls, and each one has different ideas.
[Allen Leuten recht getan ist eine Kunst die niemand kann ;-]
DoDi
