Editing multiple cells in TabularEditor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Editing multiple cells in TabularEditor

ameya chougule
Hii

I have developed GUI interface for displaying and editing 2-D array elements using TabularEditor of TraitsUI.
Using it, I can edit only one cell at a time.
I want to edit multiple entries at a time, say by pressing ctrl-key and selecting cells and then entering value or  by selecting rectangular region. In short, this can be seen as: http://www.cse.iitb.ac.in/~ameyamc/enthought/basic.jpg

Can you please help me in this?

Thank you
Take care

Regards
ameya

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing multiple cells in TabularEditor

bryce hendrix-2
ameya chougule wrote:

> Hii
>
> I have developed GUI interface for displaying and editing 2-D array
> elements using TabularEditor of TraitsUI.
> Using it, I can edit only one cell at a time.
> I want to edit multiple entries at a time, say by pressing ctrl-key
> and selecting cells and then entering value or  by selecting
> rectangular region. In short, this can be seen as:
> http://www.cse.iitb.ac.in/~ameyamc/enthought/basic.jpg 
> <http://www.cse.iitb.ac.in/%7Eameyamc/enthought/basic.jpg>
>
> Can you please help me in this?
>

I don't think you can do this with the TabularEditor, since it doesn't
have any way of indicating which columns are selected. You can use the
TableEditor instead, which as atttributes for selected cells. You'll
have to listen for changes to any of the items represented by the rows,
then figure out which value in the array changed and replace all
selected cell values.

Alternatively, put a button in the GUI which pops up a UI for filling
the selected cells.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Editing multiple cells in TabularEditor

ameya chougule
Hii

As TableEditor is used for instance of list of objects of supporting class, how to fit two-dimensional array in it?
It is working for fix dimensions of array - having no of attributes in supporting class equal to columns of 2D array and then adding array rows in Instance. But I want to do it for dynamic arrays - size may vary.

Also, how to set value of multiple selected cells? edit_view of TableEditor not shown when selection_mode is 'cells'. how to activate drag and drop feature ?

Can you please give me examples if any for above two?

Thank you
Take care

Regards
ameya



On Fri, Mar 26, 2010 at 9:33 PM, bryce hendrix <[hidden email]> wrote:
ameya chougule wrote:
> Hii
>
> I have developed GUI interface for displaying and editing 2-D array
> elements using TabularEditor of TraitsUI.
> Using it, I can edit only one cell at a time.
> I want to edit multiple entries at a time, say by pressing ctrl-key
> and selecting cells and then entering value or  by selecting
> rectangular region. In short, this can be seen as:
> http://www.cse.iitb.ac.in/~ameyamc/enthought/basic.jpg
> <http://www.cse.iitb.ac.in/%7Eameyamc/enthought/basic.jpg>
>
> Can you please help me in this?
>

I don't think you can do this with the TabularEditor, since it doesn't
have any way of indicating which columns are selected. You can use the
TableEditor instead, which as atttributes for selected cells. You'll
have to listen for changes to any of the items represented by the rows,
then figure out which value in the array changed and replace all
selected cell values.

Alternatively, put a button in the GUI which pops up a UI for filling
the selected cells.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev