Recent

Author Topic: PageControl cannot change TabSheet if Label on Panel on Tabsheet  (Read 570 times)

jamie

  • Hero Member
  • *****
  • Posts: 4673
Re: PageControl cannot change TabSheet if Label on Panel on Tabsheet
« Reply #15 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.
The only true wisdom is knowing you know nothing

dseligo

  • Hero Member
  • *****
  • Posts: 651
Re: PageControl cannot change TabSheet if Label on Panel on Tabsheet
« Reply #16 on: June 18, 2022, 07:35:03 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.

It's Groupbox that receive click events. I tried it with this:
Code: Pascal  [Select][+][-]
  1. const cnt: Integer = 0;
  2. begin
  3.   inc(cnt);
  4.   Caption := cnt.ToString;
  5. end;

It's counting when I click on page title. If I disable autosize of label, then it doesn't count anymore.

jipété

  • New Member
  • *
  • Posts: 31
Re: PageControl cannot change TabSheet if Label on Panel on Tabsheet
« Reply #17 on: June 20, 2022, 01:19:04 pm »
It's counting when I click on page title. If I disable autosize of label, then it doesn't count anymore.
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 !

 

TinyPortal © 2005-2018