This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Component Table

Frequently asked questions about VisionX.

Component Table

Postby lucdep » Tue Apr 02, 2019 3:53 pm

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
lucdep
 
Posts: 52
Joined: Wed Oct 10, 2018 12:01 pm

Re: Component Table

Postby rjahn » Tue Apr 02, 2019 5:59 pm

What is your use-case?

The ComponentTable is a very special control which acts like a table but is a Panel with copied elements.
rjahn
 
Posts: 41
Joined: Sun Sep 13, 2009 1:54 pm

Re: Component Table

Postby lucdep » Tue Apr 02, 2019 6:41 pm

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...
lucdep
 
Posts: 52
Joined: Wed Oct 10, 2018 12:01 pm

Re: Component Table

Postby johnit » Wed Apr 03, 2019 7:15 am

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.
johnit
 
Posts: 37
Joined: Fri Nov 16, 2012 5:58 pm


Return to VisionX