How can I set the focus on a row with row index or column ID? I like to have the same effect like I would click into the cell with the mouse?

asked 11.12.2012 at 09:32

Katharina%20Kaczmarczyk's gravatar image

Katharina Ka...
(suspended)
accept rate: 0%


You can use changeSelection(...) for this.

Button = new RButton();
Button.setText("set focus");
Button.setName("Button");
Button.addActionListener(new IActionListener() {
    @Override
    public void actionPerformed(ActionEvent event) 
    {
        Ivy.log().info("force table selection");
        Table.requestFocus();
        Table.changeSelection(1, 1, true, true);
    }
});
link

answered 13.12.2012 at 09:00

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×40
×12
×7

Asked: 11.12.2012 at 09:32

Seen: 1,974 times

Last updated: 11.12.2012 at 09:32