Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Customizing Listview


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Mar 16, 2017 4:51 PM Last Post By: Graham Murt
Shanil M

Posts: 62
Registered: 12/24/04
Customizing Listview  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 3, 2017 1:39 AM
Hi I am using 10.1 Berlin Version 24.0.25048.9432 update 2.

Looking at the top of this wiki:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Customizing_FireMonkey_ListView_Appearance

How do they get the custom blue item highlight? I tried the listview style (from edit custom style) and cannot find an option to change the highlight color.

I had a discussion about this on stackoverflow and it seems the selector colour is under listboxstyle, not listviewstyle. Why??

This is a screenshot of my listboxstyle:
http://tinypic.com/r/wqy23a/9.
The other guy has a selector but I don't. Am I on the right track?

thanks
Shanil

Edited by: Shanil M on Mar 8, 2017 11:20 PM
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Customizing Listview  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2017 4:51 PM   in response to: Shanil M in response to: Shanil M
Hi Shanil,

TksVirtualListView is fully customisable within the object inspector or via a few lines of code.

Example:

procedure TForm2.FormCreate(Sender: TObject);
var
  ICount: integer;
begin
  ksVirtualListView1.Appearence.SelectedFontColor := claWhite;
  ksVirtualListView1.Appearence.SelectedColor := claCadetblue;
  ksVirtualListView1.SelectionOptions.KeepSelection := True;
 
  for ICount := 1 to 5 do
  begin
    ksVirtualListView1.Items.Add('Item: '+IntToStr(ICount), 'the subtitle', 'detail', atMore);
  end;
end;


Will give the following result...
https://dl.dropboxusercontent.com/u/24455058/2017-03-16%2023.48.26.png

Download full source and samples from here...
https://bitbucket.org/gmurt/kscomponents


Shanil M wrote:
Hi I am using 10.1 Berlin Version 24.0.25048.9432 update 2.

Looking at the top of this wiki:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Customizing_FireMonkey_ListView_Appearance

How do they get the custom blue item highlight? I tried the listview style (from edit custom style) and cannot find an option to change the highlight color.

I had a discussion about this on stackoverflow and it seems the selector colour is under listboxstyle, not listviewstyle. Why??

This is a screenshot of my listboxstyle:
http://tinypic.com/r/wqy23a/9.
The other guy has a selector but I don't. Am I on the right track?

thanks
Shanil

Edited by: Shanil M on Mar 8, 2017 11:20 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02