Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to set id`s to org.eclipse.swt.widgets.Table items and rows (I`m having a situation, where I need to set id`s to rows and columns inside a SWT table to help QA for their automation)
How to set id`s to org.eclipse.swt.widgets.Table items and rows [message #1219530] Wed, 04 December 2013 12:27
Naveen Aechan is currently offline Naveen AechanFriend
Messages: 4
Registered: December 2013
Junior Member
Hi all,

SWT provided us an option to set ID`s to each component in SWT i.e; using a VM argument "-Dorg.eclipse.rap.rwt.enableUITests=true" and setting an a property called "WidgetUtil.CUSTOM_WIDGET_ID"

Button button = new Button(parent,SWT.BORDER);

using this we get html something like <div id="mybutton" ... />. In the same way we need to have id`s to table column and tableitems.

Problem here is using above mentioned approach, I was unable to get id`s, I would really appreciate, if anyone have an approach to get this done.

Table table = new Table(this, SWT.BORDER | SWT.FULL_SELECTION);
this.table.setBounds(0, 0, this.tableWidth, this.tableHeight);
TableColumn tc1 = new TableColumn(table, SWT.CENTER);
tc1.setData(WidgetUtil.CUSTOM_WIDGET_ID, "colId");

TableItem item1 = new TableItem(this.table, SWT.NONE);
item1.setData(WidgetUtil.CUSTOM_WIDGET_ID, "tableitem");

Previous Topic:How to convert characters the User enters into a Textbox to CAPs conditionally?
Next Topic:How Program.launch(mailto) can find email client is not set?
Goto Forum:

Current Time: Sat Aug 29 21:00:45 GMT 2015

Powered by FUDForum. Page generated in 0.15146 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software