Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6354041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:30:46+00:00 2026-05-24T22:30:46+00:00

When using a TListView and themes are disabled in the Application, the focused and

  • 0

When using a TListView and themes are disabled in the Application, the focused and selected item appears something like this:

enter image description here

Notice in both images where the triangle is. The painted box for the item does not draw where the icon appears. In a TListBox the painted item fills the whole selected item.

How might I be able to get the icon part of the selected item to fill, just as it does with the text part?

I know TListBox renders like this, but I require the use of TListView for the Data property, also the TListView handles icons better via a TImageList.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:30:46+00:00Added an answer on May 24, 2026 at 10:30 pm

    You’ll need to use the OnCustomDraw events of TListView. Within the event handler:

    1. Determine if the item is selected
    2. Determine if the control is focused
    3. Draw the appropriate selection rectangle if the item is selected (grey if the control isn’t selected, blue if it is)
    4. Draw the text
    5. Draw the image from the imagelist using TImageList.Draw

    There are methods for doing these things, such as DrawText and FillRect.

    Note that you can use TListBox rather than TListView if you’d rather. You indicated you need the Data property for items in the list, I’d assume to tie them up to your actual model objects. You can do this with anything that supports TStrings (such as TListBox.Items) using TStrings.Objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing an windows application and in this project i am using ListView
Im using listview in my listview activity with listAdapter like this: setListAdapter(new ArrayAdapter<MyItem>(this,R.layout.catalog, R.id.label,
I would like to draw an icon/bmp into a subitem of a TListView using
In my WPF application , I am using ListView GridView, and I implemented a
I'm using a ListView in C# to make a grid. I would like to
I have a application that like firefox, can be enhanced from plugins available from
I tried to use a TListView component to display rather large data lists (like
I have an index.html file which looks like this (the rest is omitted), <ul
I'm using jQuery Mobile for my application that runs mainly on desktop browsers. The
I'm using listview control with the following parameters set: this.listView1.BackColor = System.Drawing.Color.Gainsboro; this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.