On 9/12/13 8:41 AM, Ricardo Aráoz wrote:
> So I've tried a couple things.
Thanks for persisting!
> i) setting ColumnCount and then setting the properties of the different
> Columns[]
> will NOT persist column widths.
Hm, that's a bug. I probably never noticed because I don't instantiate my
columns
that way.
> ii) using addColumn() (with no arguments) and setting the properties of the
> different
> Columns[] will NOT persist column widths.
Probably a bug, too. I'd need to think about it.
> iii) using addColumn(Datafield='someDataField') and setting the properties of
> the
> different Columns[] WILL persist column widths.
It should persist no matter how the column was instantiated.
> iv) commenting out the app.BasePrefKey() and app.setAppInfo() lines does not
> affect
> the behaviour in this respect.
That's expected.
> So there is obviously some issue with the creation of columns with
> ColumnCount and
> setting their properties later. If it is not permitted by design this should
> be
> documented.
It should be permitted. For what it's worth, here's how I tend to instantiate
grids
and columns:
{{{
from dabo.ui import dGrid, dColumn
class Column(dColumn):
def initProperties(self):
self.HeaderFontBold = True
## other common properties set here
class Grid(dGrid):
def initProperties(self):
self.DataSource = "customers"
def afterInit(self):
self.addColumn(Column(self, DataField='name', Caption='Name'))
self.addColumn(Column(self, DataField='phone', Caption='Phone'))
}}}
> There is also an issue with addColumn() without arguments, it doesn't work.
I guess we need a different bug report for that.
Please file these reports on our github issue tracker.
And thanks again for testing different cases and following through. I'll try to
reciprocate.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]