Page 1 of 1

Component Table

PostPosted: Tue Apr 02, 2019 3:53 pm
by lucdep
Hi,

I'm trying to detect a MouseClick on a component table, but it doesn't seem to work...

Code: Select all
componentTable1.setLayout(formLayout3);
      componentTable1.setDataBook(rdbContContact);
      componentTable1.setLineColor(new UIColor(0x548dd4));
      componentTable1.setBackground(new UIColor(0xf0f0f0));
      componentTable1.add(editContContactContFirstname, formLayout3.getConstraints(0, 0));
      componentTable1.add(editContContactContLastname, formLayout3.getConstraints(1, 0, 2, 0));
      componentTable1.add(editContContactContTelephone, formLayout3.getConstraints(0, 1));
      componentTable1.add(editContContactContMobile, formLayout3.getConstraints(1, 1));
      componentTable1.add(editContContactContEmail, formLayout3.getConstraints(2, 1, 3, 1));
      componentTable1.eventMouseClicked().addListener(this, "doEditContact");


When do the same with a normal table, using EventMouseClick.addListener to call function doEditContact, everything works like expected.
How do I access Events on a Component Table?

Luc

Re: Component Table

PostPosted: Tue Apr 02, 2019 5:59 pm
by rjahn
What is your use-case?

The ComponentTable is a very special control which acts like a table but is a Panel with copied elements.

Re: Component Table

PostPosted: Tue Apr 02, 2019 6:41 pm
by lucdep
I want to show the fields of every datarow over 3 lines (many fields to show), but give the possibility to open an edit popup window when clicking on the row.
I have also tried to put Listeners on the separate fields, but that gave no event either...

Re: Component Table

PostPosted: Wed Apr 03, 2019 7:15 am
by johnit
Why don't you add an edit button? I have a similar solution in my application. The feedback of my users is very positive. I guess a click isn't very clear for all users.