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 » Can I center an Option control in an ArrayCtrl column?
Can I center an Option control in an ArrayCtrl column? [message #10948] Mon, 06 August 2007 23:33 Go to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
I've tried the following, which does not work:

_FooArrayCtrl.AddColumn(t_("Enable")).SetDisplay(StdCenterDisplay()).Ctrls <Option>();

Any suggestions?

--jlf
Re: Can I center an Option control in an ArrayCtrl column? [message #10952 is a reply to message #10948] Tue, 07 August 2007 01:06 Go to previous messageGo to next message
mezise is currently offline  mezise
Messages: 54
Registered: April 2006
Member
mistake

[Updated on: Tue, 07 August 2007 01:09]

Report message to a moderator

Re: Can I center an Option control in an ArrayCtrl column? [message #10954 is a reply to message #10952] Tue, 07 August 2007 13:31 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

BTW: If you'd use GridCtrl you could center an option control like this:
grid.AddColumn("Option column").Option()

Option is a simple helper method. One can use it instead of Ctrls(void (*factory)(One<Ctrl>&) if extra initialization of option control is not needed. And what's important in your case it creates centered option control. It just make implicit call of CtrlAlignHorzCenter(CtrlsImg::O0().GetSize().cx)
icon7.gif  Re: Can I center an Option control in an ArrayCtrl column? [message #10957 is a reply to message #10954] Tue, 07 August 2007 16:35 Go to previous messageGo to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
Yes, that works very well. I guess I'll have to research the differences between ArrayCtrl and GridCtrl, but I've already converted over.

Thanks,

--jlf
Re: Can I center an Option control in an ArrayCtrl column? [message #10962 is a reply to message #10948] Tue, 07 August 2007 19:28 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Back to ArrayCtrl:

SetDisplay does not really affect the embedded widget - they are mutually exclusive.

If you need something like centered Option, the best option is to create it as composition. Instead of adding Option, add composed object consisting of ParentCtrl and Option as its child.
Previous Topic: how align a column?
Next Topic: crash in dev version of GridCtrl.cpp
Goto Forum:
  


Current Time: Mon Apr 29 05:13:45 CEST 2024

Total time taken to generate the page: 0.02837 seconds