TTMSFNCListbox on WebPanel with relative position: listitems not selectable

When a FNC Listbox is placed on a relative WebPanel, the listitems can't be clicked (scrollbars work like expected though...)
Example at http://www.ftk.be/fnconpanel/

Trying to create a project to reproduce this, I could not see this issue.
Test project is here:
Project3.zip (6.0 KB)
Please see its settings for how to do this.

The problem is when for example, the form is contained under an external element, like a nav-bar (cfr the site in my post). There seems to be a problem with the offset of the used navbar: when clicked in the listbox at the position of the height of the navbar, a lustitem gets selected in the listbox with the height of the navbar.
The same problem exists when showing a secundary form with the listcontrol in a container on the main form.
If you want, I can send you my sourcecode for the test-project…

I suggest you modify the test project we created so the issue shows in that project and we can investigate.

Dear Bruno,

I modified your project.

The only things I’ve modified:

A second panel with 2 buttons. The panel also has its position st to epRelative.

I’ve changed the childorder to 0 and that of the original panel to 1.

In the attached project, I intentionally have set the height of the button-panel to ssAbsolute.

Running the project with this setting, none of the listboxitems can be clicked.

If the height of the button-panel is lowered or heightstyle set to ssAuto, items can be clicked but the wrong item gets selected. The selected one always seems to have the same offset downwards.

Filip

Project3.zip (6.67 KB)

PS: This problem isn't limited to a FNCListbox: any selectable control, including the FNCGrid has this problem.

It makes the use of FNC-controls questionable...

Can you please dive in for a solution. Coding ways around the problem makes the "RAD" in TMS Web RAD disappear.

This was a quite complex mix of absolute positioned controls, relative positioned controls, HTML template controls and the use of a form container added to that.
We have applied a fix internally and are doing further testing. When no regressions are found, this fix will be included in the next release.

I have this problem with the FNCCalendar.

The calendar is alClient in a TWebHTMLDiv.
The TWebHTMLDiv is "ElementPosition=epRelative"

The Mouse-Click-Position is not correct. (with epAbsolute it works)

A bootstrap project
FormContainer = "pagecontent"

Unit HTML

<body>
  <main>
    <div class="container">
      <h1>Title text</h1>
      <p class="lead">Einstellungen für Verwaltung. Kalender, usw. </p>
      <div class="row">
        <div class="col-12"> <div id="pagecontent"> </div>
      </div>
    </div>
  </main>>
</body>

Unit PAS

type
  TfrmZaboricAdmin = class(TWebForm)
    cal1: TTMSFNCCalendar;
    cal2: TTMSFNCCalendar;
    divCal1: TWebHTMLDiv;
    divCal2: TWebHTMLDiv;
    divCal3: TWebHTMLDiv;
    cal3: TTMSFNCCalendar;
    divRowCal: TWebHTMLDiv;
  private
  public
  end;

Unit DFM
see Attachment


Zaboric.Main.dfm (12.5 KB)

Please, why make it time consuming & error prone to try to reproduce this based on 3 separate code extracts while you could simply zip 3 files and send these?

After the necessary effort to reconstruct based on these bits & pieces, we could reproduce & fix this issue. The next update will address this.

I thought it would be easier that way, since apart from the DFM there is hardly anything in the code.

Thank you.