El 12/09/13 11:35, John Fabiani escribió:
On 09/12/2013 04:50 AM, Ricardo Aráoz wrote:
El 12/09/13 08:02, Ricardo Aráoz escribió:
El 12/09/13 01:46, Paul McNett escribió:
On 9/11/13 8:40 PM, Ricardo Aráoz wrote:
I've tried this (see below), and yet the grid won't remember the column widths. The
window and other stuff are remembered.
I've also tried the code with the "import dabo.dPref as dPref" and
"app.PreferenceManager =....." commented out, i.e. with no code referring to the
Preferences, and it doesn't work either.
Can you make sure it works in a plain dabo app? Run dabo/dabo/ui/uiwx/dGrid.py, adjust the column width of a column, and quit. Then run it again. Did that work?


dGrid.py works ok. I'll take a look at it's code and try to figure out what's going on. Or I'll get the smallest app that shows the behaviour.
Thanks

Ok, couldn't understand dGrid.py test (too complicated for me). So I got a working example that displays said behaviour (see code below). That is, you adjust the column widths and the adjustment won't persist.
This is :

Try below. But notice I add the columns and I set the BasePrefKey. You need to set the BasePrefKey because you might have a namespace (I guess that's what you call it when dealing with user preferences for objects) conflict. I think you were resetting the columns each time.

So I've tried a couple things.

i) setting ColumnCount and then setting the properties of the different Columns[] will NOT persist column widths.

ii) using addColumn() (with no arguments) and setting the properties of the different Columns[] will NOT persist column widths.

iii) using addColumn(Datafield='someDataField') and setting the properties of the different Columns[] WILL persist column widths.

iv) commenting out the app.BasePrefKey() and app.setAppInfo() lines does not affect the behaviour in this respect.

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.
There is also an issue with addColumn() without arguments, it doesn't work.

Ricardo

P.S.: John, AFAIK BasePrefKey is what sets a different pref name space for my app. What does setAppInfo do? And why do you setAppInfo twice (or was that just a typo)?






_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/5231e0a4.4000...@gmail.com

Reply via email to