Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make a custom CellEditor register changes without loss of focus?

 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have written my own component that is kind of like a checkbox, called a SelectableComponent. I am busy putting this into various tables and I would like to ask a question about the custom cell editor that I'm using to edit
the component in the table.

To give you a quick overview, the SelectableComponent has two boolean values, isSelectable and isSelected.

If the SelectableComponent.isSelectable() then the renderer shows a checkbox in the table. Else it shows a blank label.

If the SelectableComponent.isSelectable(), then the editor is placed on the cell.

Now the problem I am having is that it is working as far as I can click on the cells to get them to change their value and as I click the checkbox selects and unselects. However, I need this clicking to be registered with another table that tally's totals, and this change at the moment registers only when the row that I am clicking on loses focus.

How can I make this change in selection fire the event without having to lose the focus?

Many kind regards,
Rachel


[ September 30, 2004: Message edited by: Rachel Swailes ]
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
something like this might work :



D.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The almighty Don returns!

Thanks for the advice, I'll give it a try and let you know how it goes.

Cheers,
Rachel
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works like a charm!
Don Rules!

Thanks again,
Rachel
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic