|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
dGrid and DataType="list" questionHello
I see references to dGrid and Columns having a DataType="list". One maillist entry referred to the Wiki for assistance on setting this up. I haven't been able to find the Wiki entry. So my question is, If I am using Class Designer, how do I set up a dGrid column to be a lookup list? Can someone point me in the right direction? Thank you Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E3380.6090802@... |
|
|
Re: dGrid and DataType="list" questionPaul McNary wrote:
> I see references to dGrid and Columns having a DataType="list". > One maillist entry referred to the Wiki for assistance on setting this > up. I haven't been able to find the Wiki entry. I thought we had a wiki entry for that too, but I can't find it here: http://dabodev.com/wiki/FrameworkDocumentation > So my question is, If I am using Class Designer, how do I set up a dGrid > column to be a lookup list? > > Can someone point me in the right direction? The dGrid test does a deop-down color picker. Do: cd dabo/dabo/ui/uiwx python dGrid.py and then look at the test code at the bottom of dGrid.py. Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E3BA1.1040503@... |
|
|
|
|
|
Re: dGrid and DataType="list" questionPaul McNett wrote:
> Paul, *please* post your dabo questions to the dabo-users list instead > of to me personally. I'm taking this back on list. > I'm using a new email client. I can't seem to get used to the reply and reply all buttons on it. I keep finding myself not doing a reply all when I thought I did. Thanks Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E50A7.2030905@... |
|
|
Re: dGrid and DataType="list" questionPaul McNett wrote:
> Yes. The choices in the list come from the list in dabo.dColors.colors, > and the fact that we want the custom editor is my setting it to the > column object's listEditorClass attribute. > >> ----------------------------------------------------------------------- >> from dGrid Test (dGrid.py) >> >> col = dabo.ui.dColumn(self, Name="Color", Order=40, DataField="color", >> DataType="string", Width=40, Caption="Favorite Color", >> Sortable=True, Searchable=True, Editable=True, Expand=False) >> >> self.addColumn(col) >> >> col.ListEditorChoices = dabo.dColors.colors >> col.CustomEditorClass = col.listEditorClass >> ----------------------------------------------------------------------- > > You got it! > > Paul > > Can the CustomEditorClass property be set in Class Designer and if so what is a correct way to do it? Where do I find what CustomEditorClasses are available? Thank you Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E51C0.5060602@... |
|
|
|
|
|
Re: dGrid and DataType="list" questionPaul McNary wrote:
> Can the CustomEditorClass property be set in Class Designer and if so > what is a correct way to do it? Ed? > Where do I find what CustomEditorClasses are available? This is an area that isn't well documented. Here are the definitions from dGrid.py: mac:~/dabo/dabo/ui/uiwx pmcnett$ grep -i 'self\..*editorclass \=' dGrid.py self.stringEditorClass = wx.grid.GridCellTextEditor self.wrapStringEditorClass = wx.grid.GridCellAutoWrapStringEditor self.boolEditorClass = wx.grid.GridCellBoolEditor self.intEditorClass = wx.grid.GridCellNumberEditor self.longEditorClass = wx.grid.GridCellNumberEditor self.decimalEditorClass = wx.grid.GridCellNumberEditor self.floatEditorClass = wx.grid.GridCellFloatEditor self.listEditorClass = wx.grid.GridCellChoiceEditor #self.listEditorClass = GridListEditor Mostly, you don't need to know about the normal ones, as Dabo will choose the correct editor based on the datatype of the column. Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E543C.7030303@... |
|
|
Re: dGrid and DataType="list" questionSorry for the dupe message(s). It's internet café syndrome.
Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E5461.1020001@... |
|
|
Re: dGrid and DataType="list" questionPaul McNett wrote:
> This is an area that isn't well documented. Here are the definitions > from dGrid.py: > > mac:~/dabo/dabo/ui/uiwx pmcnett$ grep -i 'self\..*editorclass \=' dGrid.py > > self.stringEditorClass = wx.grid.GridCellTextEditor > self.wrapStringEditorClass = wx.grid.GridCellAutoWrapStringEditor > self.boolEditorClass = wx.grid.GridCellBoolEditor > self.intEditorClass = wx.grid.GridCellNumberEditor > self.longEditorClass = wx.grid.GridCellNumberEditor > self.decimalEditorClass = wx.grid.GridCellNumberEditor > self.floatEditorClass = wx.grid.GridCellFloatEditor > self.listEditorClass = wx.grid.GridCellChoiceEditor > #self.listEditorClass = GridListEditor > > Mostly, you don't need to know about the normal ones, as Dabo will > choose the correct editor based on the datatype of the column. > > Paul > > col.CustomEditorClass = col.listEditorClass to work. What is the correct format to get the others to work the wx.grid ones? Thank you Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487E686B.5010803@... |
|
|
Re: dGrid and DataType="list" questionOn Jul 16, 2008, at 3:04 PM, Paul McNett wrote:
>> Can the CustomEditorClass property be set in Class Designer and if so >> what is a correct way to do it? > > Ed? It's not a property exposed in the prop sheet, so it should probably go in the afterInit() method of the grid. -- Ed Leafe _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/8A6C67B2-5E66-4CFD-B5E0-9AFFA080CBB4@... |
|
|
Re: dGrid and DataType="list" questionPaul McNary wrote:
> Paul McNett wrote: >> This is an area that isn't well documented. Here are the definitions >> from dGrid.py: >> >> mac:~/dabo/dabo/ui/uiwx pmcnett$ grep -i 'self\..*editorclass \=' dGrid.py >> >> self.stringEditorClass = wx.grid.GridCellTextEditor >> self.wrapStringEditorClass = wx.grid.GridCellAutoWrapStringEditor >> self.boolEditorClass = wx.grid.GridCellBoolEditor >> self.intEditorClass = wx.grid.GridCellNumberEditor >> self.longEditorClass = wx.grid.GridCellNumberEditor >> self.decimalEditorClass = wx.grid.GridCellNumberEditor >> self.floatEditorClass = wx.grid.GridCellFloatEditor >> self.listEditorClass = wx.grid.GridCellChoiceEditor >> #self.listEditorClass = GridListEditor >> >> Mostly, you don't need to know about the normal ones, as Dabo will >> choose the correct editor based on the datatype of the column. >> > OK, I was able to get > col.CustomEditorClass = col.listEditorClass > to work. > > What is the correct format to get the others to work the wx.grid ones? col.CustomEditorClass = col.intEditorClass, for example. Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EB543.6070602@... |
|
|
Re: dGrid and DataType="list" questionEd Leafe wrote:
> On Jul 16, 2008, at 3:04 PM, Paul McNett wrote: > >>> Can the CustomEditorClass property be set in Class Designer and if so >>> what is a correct way to do it? >> Ed? > > > It's not a property exposed in the prop sheet, so it should probably > go in the afterInit() method of the grid. > > -- Ed Leafe > I found that I had to do it in afterInitAll() for it to work. Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EB710.7020406@... |
|
|
Re: dGrid and DataType="list" questionPaul McNett wrote:
>>> self.intEditorClass = wx.grid.GridCellNumberEditor >>> self.longEditorClass = wx.grid.GridCellNumberEditor >>> self.decimalEditorClass = wx.grid.GridCellNumberEditor >>> self.floatEditorClass = wx.grid.GridCellFloatEditor >>> self.listEditorClass = wx.grid.GridCellChoiceEditor >>> #self.listEditorClass = GridListEditor >>> >>> Mostly, you don't need to know about the normal ones, as Dabo will >>> choose the correct editor based on the datatype of the column. >>> >> OK, I was able to get >> col.CustomEditorClass = col.listEditorClass >> to work. >> >> What is the correct format to get the others to work the wx.grid ones? > > col.CustomEditorClass = col.intEditorClass, for example. > > Paul > > OK, use what's on the left side of the '=' sign. For now the only list type is the GridCellChoiceEditor, which is tied to listEditorClass? I think I understand now. Thanks Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EB7F1.8080706@... |
|
|
Re: dGrid and DataType="list" questionPaul McNary wrote:
> Paul McNett wrote: >>> What is the correct format to get the others to work the wx.grid ones? >> col.CustomEditorClass = col.intEditorClass, for example. >> > OK, use what's on the left side of the '=' sign. > For now the only list type is the GridCellChoiceEditor, which is tied to > listEditorClass? > I think I understand now. Yes, the left side of the '=' is the CustomEditorClass property of the dColumn object. What's on the right is an attribute of the dColumn object set up in dColumn's __init__ for your convenience. However, we (the Dabo developers) need to make this a bit better. There should be IMO a static list of possible choices, documented in the dColumn property api docs. I'll see about doing that soon. Here are the relevant api docs, btw: http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dGrid.dColumn.html http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dGrid.dColumn.html#Properties_CustomEditorClass Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EB967.5010306@... |
|
|
Re: dGrid and DataType="list" questionOn Jul 16, 2008, at 10:05 PM, Paul McNary wrote:
>> It's not a property exposed in the prop sheet, so it should probably >> go in the afterInit() method of the grid. >> >> -- Ed Leafe >> > Hello Ed > > I found that I had to do it in afterInitAll() for it to work. Yes, you are correct. That's what I get for responding on the fly! -- Ed Leafe _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/F9BE4562-B1CB-4F36-8FBE-F719D02AF572@... |
|
|
Re: dGrid and DataType="list" questionEd Leafe wrote:
> On Jul 16, 2008, at 10:05 PM, Paul McNary wrote: > >>> It's not a property exposed in the prop sheet, so it should probably >>> go in the afterInit() method of the grid. >>> >>> -- Ed Leafe >>> >> Hello Ed >> >> I found that I had to do it in afterInitAll() for it to work. > > Yes, you are correct. That's what I get for responding on the fly! > > -- Ed Leafe > > > > > to stop "flying" would have been frustrating. Thanks Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EC010.9060809@... |
|
|
Re: dGrid and DataType="list" questionEd Leafe wrote:
> On Jul 16, 2008, at 10:05 PM, Paul McNary wrote: > >>> It's not a property exposed in the prop sheet, so it should probably >>> go in the afterInit() method of the grid. >>> >>> -- Ed Leafe >>> >> Hello Ed >> >> I found that I had to do it in afterInitAll() for it to work. > > Yes, you are correct. That's what I get for responding on the fly! I find myself surmising what I'm doing differently in my code. I've never found a need for afterInitAll(). Paul _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487EC6FE.9050606@... |
|
|
Re: dGrid and DataType="list" questionPaul McNett wrote:
>>> Yes, you are correct. That's what I get for responding on the fly! > > I find myself surmising what I'm doing differently in my code. I've > never found a need for afterInitAll(). > > Paul > > If I understand correctly, you hand code instead of using Class Designer, so you can deal with it as part of the original setup when you instantiate the controls. Right now I really don't want to hand code unless I have to. To get done what I have to get done I need RAD tools like Class Designer. I don't know Python except at a beginner's level. I don't want to deal with Tier 1 and 3 except with RAD tools. Now Tier 2, Biz objects that's what I deal with the best and you guys have made it so that the drudgery of the UI code is fast and painless with Class Designer, when the learning curve is over, and there are all the RAD tools you could ever want for the Database Tier. So having to do things, to have most of the UI done for me with a GUI RAD tool, in different places is worth it. So if I find I can stick something in afterInitAll() and it works without a gigantic performance hit, I'm going to choose that way. The great thing is Dabo let's you do it your way and I can do it my way. The philosophical differences between you and Ed, about this subject has been excellent reading on the web sites and mailing lists. It creates a much better product. Thanks again for the nice framework and tools Paul McNary pmcnary@... _______________________________________________ Post Messages to: Dabo-users@... Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/487ECA95.10801@... |
|
|
Re: dGrid and DataType="list" questionby Paul McNett |