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 » GridCtrl align text in column
GridCtrl align text in column [message #9987] Tue, 12 June 2007 21:16 Go to next message
h3l1 is currently offline  h3l1
Messages: 28
Registered: August 2006
Location: Innsbruck, Austria
Promising Member
Hello folks,

just trying to do a little editor for a lcd display to show status of pc as graphics.

Now I use the GridCtrl and I'm really impressed Shocked
I added an EditField with a FrameRight<Button> to edit a filename
of an image (with FileSel). The problem is the length of the filename. How can I align it right, so at first the path is hidden...

Or maybe how can I add a tooltip so everyone can see the filename?

Maybe someone knows a solution.

Thanks in advance!

Heli

Re: GridCtrl align text in column [message #9988 is a reply to message #9987] Tue, 12 June 2007 21:26 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

when adding column call AlignRight():
grid.AddColumn("The path").AlignRight();

that's all Wink
GridCtrl dosn't support auto tooltip yet, but I think it's a good moment to add it.
Re: GridCtrl align text in column [message #9989 is a reply to message #9988] Tue, 12 June 2007 21:34 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

You can also use wrapping property. Just add after AlignRight():
grid.AddColumn("The path").AlignRight().WrapText();

and set proper height of a row (for example 40):
grid.SetDefaultRowHeight(40)

Auto height is not implemented so for now you must control it manually or turn on rows' resizing.
Soon I will refactor GridCtrl a lot so expect auto height calculation to be there.
Re: GridCtrl align text in column [message #10022 is a reply to message #9989] Thu, 14 June 2007 10:34 Go to previous messageGo to next message
h3l1 is currently offline  h3l1
Messages: 28
Registered: August 2006
Location: Innsbruck, Austria
Promising Member
Hi,

thanks for the quick reply and I didn't read it yet Rolling Eyes

I tried AlignRight, but there are some minor problems with this.
It should be possible to set the alignment for the header and
the body of the table seperately.
Also it does change the vertical alignment (look at the picture).

Thanks
Heli
  • Attachment: gridctrl.png
    (Size: 2.33KB, Downloaded 303 times)
Re: GridCtrl align text in column [message #10024 is a reply to message #10022] Thu, 14 June 2007 12:28 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes, that's a bug. I will fix it today. I will also separate aligning for header and body.
Re: GridCtrl align text in column [message #10025 is a reply to message #10024] Thu, 14 June 2007 14:01 Go to previous messageGo to next message
h3l1 is currently offline  h3l1
Messages: 28
Registered: August 2006
Location: Innsbruck, Austria
Promising Member
Cool thanks.
An other problem is, if the text is very long like a filename Very Happy it is not correctly aligned right, as it starts always with the left side and cuts off the rest Confused

Bye
Heli

p.s. hope you have seen the translation file http://www.ultimatepp.org/forum/index.php?t=msg&th=2438& amp;start=0&

[Updated on: Thu, 14 June 2007 14:04]

Report message to a moderator

Re: GridCtrl align text in column [message #10026 is a reply to message #10025] Thu, 14 June 2007 15:08 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanks! I'll check that one too. The problem is some part of GridCtrl is untested. Thanks for hunting the bugs.
Previous Topic: How to get edit data in virtual ArrayCtrl?
Next Topic: Ctrls<>() Callback / Disable some rows
Goto Forum:
  


Current Time: Tue May 14 04:53:39 CEST 2024

Total time taken to generate the page: 0.02682 seconds