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 07:27
Naveen Aechan is currently offline Naveen Aechan
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);
button.setData(WidgetUtil.CUSTOM_WIDGET_ID,"mybutton");



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.setWidth(120);
tc1.setData(WidgetUtil.CUSTOM_WIDGET_ID, "colId");

TableItem item1 = new TableItem(this.table, SWT.NONE);
item1.setText(0,"one");
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: Mon Jul 28 14:30:16 EDT 2014

Powered by FUDForum. Page generated in 0.11530 seconds