View previous topic :: View next topic |
Author |
Message |
rp Guest
|
Posted: Sat Jan 21, 2006 12:04 am Post subject: RowWidget.GetOptimalRowWidth |
|
|
I'm doing some custom drawing of row widgets and would like a method that specifies how wide the custom row is. I know you can specify how wide a particular column is, but I'd like to be able to override the entire row's width on specific rows without modifying how wide a column is. Much like you can override a row's height with RowWidget.GetOptimalRowHeight. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 23, 2006 4:29 am Post subject: |
|
|
Virtual Tree doesn't really have a concept of RowWidth - instead the width is just the total width of all the columns. You could add a column at the end of your columns which you set the width of so as to get the total row width you require. Would this work for you? _________________ Infralution Support |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rp Guest
|
Posted: Mon Jan 23, 2006 4:58 pm Post subject: |
|
|
Yes, that way works, but the hash mark at the end of the placeholder column is visible, and the column header can be clicked on. It feels and looks like a hack. Is there a column header style setting I'm missing?
Instead of adding a placeholder column, you could add a call to an overrideable method (i.e. OnGetOptimalRowWidth) when you calculate the total width of all columns. You could have the default method return -1 to signal normal row width calculation. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Jan 23, 2006 11:50 pm Post subject: |
|
|
What do you mean by the hash mark?
Try setting the following
Column.Sortable = false
Column.Movable = false
Let me know if this isn't sufficient and we will look at adding your request in the next major release. _________________ Infralution Support |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rp Guest
|
Posted: Tue Jan 24, 2006 4:28 pm Post subject: |
|
|
Yeah I have those properties set that way.
Here's an image showing the hash mark at the end: (the last verticle bar in the header column):
And here's an image showing that column header while a user clicks on it: (shouldn't be clickable)
![](http://img59.imageshack.us/img59/9264/hash21ae.png) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jan 24, 2006 11:11 pm Post subject: |
|
|
OK - I see how you are using this now. One of the items on our to-do feature list is to implement preview text which can span columns as you are doing - so I'm guessing that this will address your issues. Have you purchased Virtual Tree? If so we will bump it up the priority list. We could probably implement this for the next major release (after the one which is currently in beta and due in about week).
It would also be possible to workaround your current issues by deriving a new ColumnHeaderWidget class that is only used for the last column (and so does not draw the border etc). _________________ Infralution Support |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rp
Joined: 25 Jan 2006 Posts: 6
|
Posted: Wed Jan 25, 2006 6:08 pm Post subject: |
|
|
Aha ColumnHeaderWidget sounds like the route I'll take for now. Thanks for the tip.
Yes I've purchased VT -- I'll PM you the info.
Thanks! |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|