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 » Image In Cell In ArrayCtrl ? !!
Image In Cell In ArrayCtrl ? !! [message #20845] Tue, 14 April 2009 01:24 Go to next message
MohamedMonem is currently offline  MohamedMonem
Messages: 7
Registered: March 2009
Promising Member
hello all

Is there a way to put an Image in cell in ArrayCtrl ?! if then how ?

thanx in advance
Re: Image In Cell In ArrayCtrl ? !! [message #20846 is a reply to message #20845] Tue, 14 April 2009 04:23 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
You have to use a Display derived class. If you want to use one cell for multi purpose (text - image) you have to create a new Display else you may use one which exist. See Display for references.

The following code add images from a iml file.
	ArrayCtrl arct;
	// ...
	arct.AddColumn("Text");
	arct.AddColumn("Image").SetDisplay(ImageDisplay()); // set a custom display for Image column
	for(int i = 0; i < Imgs::GetCount(); i++)
		arct.Add(Imgs::GetId(i), Imgs::Get(i));
Re: Image In Cell In ArrayCtrl ? !! [message #20847 is a reply to message #20846] Tue, 14 April 2009 04:35 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
P.S.: If you want images just for certain cells you may use
SetDisplay(cell, col, ImageDisplay());
in that way you have custom image for specified cell and others use StdDisplay (which display text).
Re: Image In Cell In ArrayCtrl ? !! [message #20860 is a reply to message #20847] Tue, 14 April 2009 23:22 Go to previous message
MohamedMonem is currently offline  MohamedMonem
Messages: 7
Registered: March 2009
Promising Member
Thanx alot andrei_natanael Smile

[Updated on: Tue, 14 April 2009 23:23]

Report message to a moderator

Previous Topic: How to set fontsize in GridCtrl
Next Topic: finding row by key
Goto Forum:
  


Current Time: Wed May 08 12:09:26 CEST 2024

Total time taken to generate the page: 0.02625 seconds