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 » FIX: ArrayCtrl to support Style
Re: FIX: ArrayCtrl to support Style [message #32061 is a reply to message #32047] Tue, 19 April 2011 19:07 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 19 April 2011 03:21

dont want to argue with you about this issue. i only propose.
EvenRowColor and OddRowColor could still remain as statics in terms of definition of the colors, but their place to store it would change (into Style instance).

i mean sth like this:
ArrayCtrl.h
	static inline void EvenRowColor(Color& paper, Color& ink) { paper = Blend(SColorMark, SColorPaper, 220); ink = SColorText; }
	static inline void OddRowColor(Color& paper, Color& ink)  { paper = SColorInfo; ink = SColorText; }

somewhere where EvenRowColor needed
ArrayCtrl::Style st; //.h

//.cpp, ctor
	st = ArrayCtrl::StyleDefault();
	ArrayCtrl::EvenRowColor(st.evenpaper, st.evenink);
	list.SetStyle(st);

which is more code ofcorse but renders ArrayCtrl as stylable where needed.




You misunderstand the true meaning of those methods.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DropGrid improvement proposals
Next Topic: Simpler way to access Option in GridCtrl
Goto Forum:
  


Current Time: Sat Aug 30 01:22:12 CEST 2025

Total time taken to generate the page: 0.03928 seconds