<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to set the focus in a RTable programmatically?</title><link>https://answers.axonivy.com/questions/472/how-to-set-the-focus-in-a-rtable-programmatically</link><description>&lt;p&gt;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?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/472/how-to-set-the-focus-in-a-rtable-programmatically" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 13 Dec 2012 09:00:20 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/472/how-to-set-the-focus-in-a-rtable-programmatically/473</link><description>&lt;p&gt;You can use &lt;code&gt;changeSelection(...)&lt;/code&gt; for this. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;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);
    }
});
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 13 Dec 2012 09:00:20 -0500</pubDate><guid>https://answers.axonivy.com/questions/472/how-to-set-the-focus-in-a-rtable-programmatically/473</guid></item></channel></rss>