Index
2011-10-13 10:38 – Chris G : [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 13:08 – Paul McNett : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 14:04 – Chris G : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 14:18 – Ed Leafe : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 15:35 – Chris G : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 15:58 – Ed Leafe : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 16:18 – Jacek Kałucki : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 16:24 – Paul McNett : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 16:57 – Chris G : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
2011-10-13 17:10 – Paul McNett : Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form
Back to top
[dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Chris G

Posted: 2011-10-13 10:38:02   Link

I discovered dabo a couple of years ago (version 0.9.2) and played with

it for a while but never actually got to grips with using it.

Since then I have learned some more Python for various reasons and now

I've come back to dabo with a specific requirement.

So, I have downloaded and installed version 0.9.4 in my xUbuntu 10.10

system and it's all working well so far. I've used the AppWizard to

create a dabo application to access the (very simple) database that I

want to deal with.

Finally to the question - is it possible to have a form/view of my table

that looks like the Browse tab view of the table but allows me to edit

(and add to) the records in place? I want especially to be able to

create a view of the table that shows the records and columns exactly as

in the Browse tab but with an extra blank row/record at the bottom into

which one can simply type the next row's values using the TAB key to go

from column to column. Ideally I'd like to be able to edit existing

records in the same manner (except of course that initial values are there

already) but that's not so important.

Having to click on each value to edit it is much too painful and the

ability to see the preceding records as one adds a new one is also very

important for this particular application.

So is it reasonably simple to do such a thing in dabo?

--

Chris Green

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/20111013143802.GA11919@chris

©2011 Chris G
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Paul McNett

Posted: 2011-10-13 13:08:51   Link

On 10/13/11 7:38 AM, Chris G wrote:

> Finally to the question - is it possible to have a form/view of my table

> that looks like the Browse tab view of the table but allows me to edit

> (and add to) the records in place?

Yes.

> I want especially to be able to

> create a view of the table that shows the records and columns exactly as

> in the Browse tab but with an extra blank row/record at the bottom into

> which one can simply type the next row's values using the TAB key to go

> from column to column. Ideally I'd like to be able to edit existing

> records in the same manner (except of course that initial values are there

> already) but that's not so important.

Yes.

> Having to click on each value to edit it is much too painful and the

> ability to see the preceding records as one adds a new one is also very

> important for this particular application.

There are cases for editable grids. You need to do two things:

1) set grid.Column.Editable = True

2) set grid.Editable = True

Find the appwizard-generated code in ui/Grd<name>.py where <name> is the table name.

> So is it reasonably simple to do such a thing in dabo?

Reasonably simple, yes. However you don't get all the bells and whistles of using a

real textbox, spinner, checkbox, etc.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/4E971B23.3020600@ulmcnett.com

©2011 Paul McNett
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Chris G

Posted: 2011-10-13 14:04:28   Link

On Thu, Oct 13, 2011 at 10:08:51AM -0700, Paul McNett wrote:

> On 10/13/11 7:38 AM, Chris G wrote:

> > Finally to the question - is it possible to have a form/view of my table

> > that looks like the Browse tab view of the table but allows me to edit

> > (and add to) the records in place?

>

> Yes.

>

> > I want especially to be able to

> > create a view of the table that shows the records and columns exactly as

> > in the Browse tab but with an extra blank row/record at the bottom into

> > which one can simply type the next row's values using the TAB key to go

> > from column to column. Ideally I'd like to be able to edit existing

> > records in the same manner (except of course that initial values are there

> > already) but that's not so important.

>

> Yes.

>

> > Having to click on each value to edit it is much too painful and the

> > ability to see the preceding records as one adds a new one is also very

> > important for this particular application.

>

> There are cases for editable grids. You need to do two things:

>

> 1) set grid.Column.Editable = True

> 2) set grid.Editable = True

>

> Find the appwizard-generated code in ui/Grd<name>.py where <name> is the table name.

>

Excellent, that means I can edit the records, however I still can't move

easily from column to column except by using the mouse. I also don't

get a new, empty row to fill in at the bottom.

I guess I need to hang some actions onto the TAB key such that hitting

it anywhere except on the last column moves to the next column and

hitting it when at the last column adds a new, blank, row to the table.

I'll go and have a play with the event handling etc.

> > So is it reasonably simple to do such a thing in dabo?

>

> Reasonably simple, yes. However you don't get all the bells and whistles of using a

> real textbox, spinner, checkbox, etc.

>

Seems good to me so far.

Thanks for the pointers.

--

Chris Green

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/20111013180428.GA16631@chris

©2011 Chris G
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Ed Leafe

Posted: 2011-10-13 14:18:02   Link

On Oct 13, 2011, at 12:08 PM, Paul McNett wrote:

> There are cases for editable grids. You need to do two things:

>

> 1) set grid.Column.Editable = True

> 2) set grid.Editable = True

>

> Find the appwizard-generated code in ui/Grd<name>.py where <name> is the table name.

Just a minor clarification on point 1) above: The code will probably have to specify a distinct column reference, e.g.:

grid.Columns[2].Editable = True

... if you want the third column from the left to be editable.

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/83CC3685-DC51-4CFF-B1E7-548B43DDA59C@leafe.com

©2011 Ed Leafe
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Chris G

Posted: 2011-10-13 15:35:24   Link

On Thu, Oct 13, 2011 at 01:18:02PM -0500, Ed Leafe wrote:

> On Oct 13, 2011, at 12:08 PM, Paul McNett wrote:

>

> > There are cases for editable grids. You need to do two things:

> >

> > 1) set grid.Column.Editable = True

> > 2) set grid.Editable = True

> >

> > Find the appwizard-generated code in ui/Grd<name>.py where <name> is the table name.

>

> Just a minor clarification on point 1) above: The code will probably have to specify a distinct column reference, e.g.:

>

> grid.Columns[2].Editable = True

>

> ... if you want the third column from the left to be editable.

>

I've simple changed the Editable property from False to True in all the

self.addColumn() calls in Grd<name>.py and that seems to have done what

I need in terms of allowing editing.

I'm still digging around in the event handling to find where to add

events for using the tab key for moving from column to column (and,

hopefully, to add a new row when at the last column).

--

Chris Green

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/20111013193524.GB19336@chris

©2011 Chris G
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Ed Leafe

Posted: 2011-10-13 15:58:33   Link

On Oct 13, 2011, at 2:35 PM, Chris G wrote:

> I'm still digging around in the event handling to find where to add

> events for using the tab key for moving from column to column (and,

> hopefully, to add a new row when at the last column).

You could start by binding the KeyDown event of the grid to a method; not sure how it would work with editable columns, though. If you get stuck, post what you've done and we can help from there.

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/523B6D8F-C901-46F7-AD0B-B458CE5D9A3B@leafe.com

©2011 Ed Leafe
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Jacek Kałucki

Posted: 2011-10-13 16:18:39   Link

Użytkownik Ed Leafe napisał:

> On Oct 13, 2011, at 2:35 PM, Chris G wrote:

>

>> I'm still digging around in the event handling to find where to add

>> events for using the tab key for moving from column to column (and,

>> hopefully, to add a new row when at the last column).

>

> You could start by binding the KeyDown event of the grid to a method; not sure how it would work with editable columns, though. If you get stuck, post what you've done and we can help from there.

>

Right.

Personally, I'm useing something like that as grid method: http://dabo.codepad.org/kFVSLpj7

--

Regards

Jacek Kałucki

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/4E97479F.1080904@rz.onet.pl

©2011 Jacek Kałucki
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Paul McNett

Posted: 2011-10-13 16:24:11   Link

On 10/13/11 12:35 PM, Chris G wrote:

> I'm still digging around in the event handling to find where to add

> events for using the tab key for moving from column to column (and,

> hopefully, to add a new row when at the last column).

Hang on, I'm working on this right now.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/4E9748EB.3080803@ulmcnett.com

©2011 Paul McNett
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Chris G

Posted: 2011-10-13 16:57:17   Link

On Thu, Oct 13, 2011 at 02:58:33PM -0500, Ed Leafe wrote:

> On Oct 13, 2011, at 2:35 PM, Chris G wrote:

>

> > I'm still digging around in the event handling to find where to add

> > events for using the tab key for moving from column to column (and,

> > hopefully, to add a new row when at the last column).

>

> You could start by binding the KeyDown event of the grid to a method; not sure how it would work with editable columns, though. If you get stuck, post what you've done and we can help from there.

>

Yes, I've done that! :-)

My application is called 'log' just to clarify the names below.

I have put the following into class GrdLog:-

self.bindEvent(dabo.dEvents.KeyDown, self.handleKey)

def handleKey(self, p2):

print "Entering handleKey()"

btn = dabo.ui.dButton(self, Caption="Click Me")

print "Leaving handleKey()"

... and it works to the extent that I see the print messages on the

console when I hit a key that doesn't already perform a function.

However I need some pointers to more documentation:-

What parameters are passed to the callback function, the new documentation at

http://thewinecellarbook.com/daboDocTestAlt/dabo.lib.eventMixin.EventMixin.html?highlight=bindevent#dabo.lib.eventMixin.EventMixin.bindEvent

doesn't seem to tell me. I guess it's documented somewhere but I

can't find it at the moment.

Some keys are handled already, so that when I hit ordinary

letter/number etc. keys they get entered into the field I'm editing

but when I hit TAB my callback function is called. So where is this

done? It would be useful to know which key codes will be handed on

to my callback function.

I'm not getting to see the button I hoped to create with

dabo.ui.dButton().

I need some pointers to documentation to show me how to move focus

on the form I have created. Basically what I need is a 'nextColumn'

method so that when I hit TAB I can move the keyboard focus to the

next column.

Wouldn't it be reasonable for TAB to move between records in the Browse

view as it already does in the Edit view?

--

Chris Green

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/20111013205717.GA20924@chris

©2011 Chris G
Back to top
Re: [dabo-users] New/returned user - question about editing/adding data on 'browse' form

Author: Paul McNett

Posted: 2011-10-13 17:10:55   Link

On 10/13/11 1:57 PM, Chris G wrote:

> Wouldn't it be reasonable for TAB to move between records in the Browse

> view as it already does in the Edit view?

grid.TabNavigates = False

That should be all you need.

Paul

_______________________________________________

Post Messages to: Dabo-users@leafe.com

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/4E9753DF.7080009@ulmcnett.com

©2011 Paul McNett