Forum > LCL

PageControl cannot change TabSheet if Label on Panel on Tabsheet

<< < (4/4)

jamie:
This obviously is a widget issue.

The autosize for label sounds like it is dominating the whole panel so all clicks maybe going to the label

One can detect that if one was to implement the OnClick for the label with a Beep etc.

 The label is a Graphic Type control so maybe another Graphic type control should be tested like a TShape, one that can receive mouse clicks.

dseligo:

--- Quote from: jamie on June 18, 2022, 04:29:45 pm ---This obviously is a widget issue.

The autosize for label sounds like it is dominating the whole panel so all clicks maybe going to the label

One can detect that if one was to implement the OnClick for the label with a Beep etc.

 The label is a Graphic Type control so maybe another Graphic type control should be tested like a TShape, one that can receive mouse clicks.

--- End quote ---

It's Groupbox that receive click events. I tried it with this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---const cnt: Integer = 0;begin  inc(cnt);  Caption := cnt.ToString;end;
It's counting when I click on page title. If I disable autosize of label, then it doesn't count anymore.

jipété:

--- Quote from: dseligo on June 18, 2022, 07:35:03 pm ---It's counting when I click on page title. If I disable autosize of label, then it doesn't count anymore.

--- End quote ---
Confirmed !

In my sample project,
Form
  Groupbox
    PageControl
      TabSheet1
        Button1
        Button2
        Panel
          Label
        Button3
      TabSheet2
If I disable autosize of label everything works fine, if I enable autosize no way to change pages with mouse.
But buttons still work !

Navigation

[0] Message Index

[*] Previous page

Go to full version