Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Icon + text inside ArrayCtrl cell
Icon + text inside ArrayCtrl cell [message #40959] Mon, 14 October 2013 10:47 Go to next message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Hello,

I have a question about customized ArrayCtrl cells. I currently have an ArrayCtrl with two columns, both filled with text. I would like to have the first column contain an icon and the text after it. The icon is HICON format, because I need to retrieve the icon associated to a window enumerated with EnumWindows. If a HICON is NULL, nothing should be drawn.

I am aware of using the Display struct with column specific draw methods. However, I just don't know how to draw this in the control. How can I draw it inside the cells?

Thanks in advance,

crydev
Re: Icon + text inside ArrayCtrl cell [message #41048 is a reply to message #40959] Thu, 24 October 2013 08:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12022
Registered: November 2005
Ultimate Member
You can assign Display to cell, then draw anything inside it (based on Value/Values).

E.g. you can store ValueMap with "ICON" and "TEXT" keys with appropriate values as cell value, then retrieve this data in your Display and use it to draw the content.
Re: Icon + text inside ArrayCtrl cell [message #41992 is a reply to message #40959] Mon, 10 February 2014 09:03 Go to previous messageGo to next message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Thanks Mirek,

I have an extra column with the icon of a window in my ArrayCtrl. However, when I move my mouse over it, it zooms the image a bit. I think this is not neat in my situation. Is there a way to disable it?

Thanks in advance!

Crydev
Re: Icon + text inside ArrayCtrl cell [message #42074 is a reply to message #41992] Sun, 16 February 2014 19:08 Go to previous message
mirek is currently offline  mirek
Messages: 12022
Registered: November 2005
Ultimate Member
crydev wrote on Mon, 10 February 2014 03:03

Thanks Mirek,

I have an extra column with the icon of a window in my ArrayCtrl. However, when I move my mouse over it, it zooms the image a bit. I think this is not neat in my situation. Is there a way to disable it?

Thanks in advance!

Crydev


Hard to say what is the cause without testcase.

Mirek
Previous Topic: GridCtrl and background color of a row
Next Topic: Redraw rows
Goto Forum:
  


Current Time: Sun Sep 22 20:14:38 CEST 2019

Total time taken to generate the page: 0.01259 seconds