Recent

Author Topic: Form In TPageControl Seems Disabled After Displaying Modal Form  (Read 1346 times)

emhartner

  • Jr. Member
  • **
  • Posts: 54
Here's what I've set up (see the project here -> https://www.dropbox.com/s/0rzm8x1tqs438my/TabbedTest.zip?dl=0):

Form1 is the main form.  I have a TPageControl on it.  In the FormShow I dock Form2 into the PageControl:
Code: Pascal  [Select][+][-]
  1.   Form2.Show;
  2.   Form2.ManualDock(PageControl1,nil,alClient);

Form2 has a few buttons on it:
  • Say Hello - just puts "Hello" up via a ShowMessage
  • Form 3 As Modal - displays Form3 via ShowModal
  • Quit - simply calls Close

Form3 simply has an OK button on it with a modal result of mrOk.

After displaying Form3 modally and then closing it via the OK button, all of the buttons in Form2 seem to be disabled and cannot be clicked.  Am I doing this wrong?

Thank you,
Eric

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #1 on: August 13, 2019, 11:12:50 pm »
Lazarus version?

emhartner

  • Jr. Member
  • **
  • Posts: 54
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #2 on: August 13, 2019, 11:59:07 pm »
v2.1.0 r61602

Built for Darwin x86_64 with widgetset cocoa.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #3 on: August 14, 2019, 02:57:21 pm »
please try r61693

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #4 on: August 14, 2019, 03:29:38 pm »
Shouldn't the docking be done to a TTabSheet inside the page control rather than to the page control itself?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #5 on: August 14, 2019, 04:53:02 pm »
Shouldn't the docking be done to a TTabSheet inside the page control rather than to the page control itself?
I'm thinking the issue is not about docking, but rather TTabControl misbehaving after the Modal mode.

emhartner

  • Jr. Member
  • **
  • Posts: 54
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #6 on: August 14, 2019, 09:55:57 pm »
Hi skalogryz,
I've installed r61693 and it works!  Thanks so much!

Was this already fixed or did you just fix it?

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #7 on: August 14, 2019, 10:02:38 pm »
did just fix it.
You can always check svn logs for the dates of revisions.

emhartner

  • Jr. Member
  • **
  • Posts: 54
Re: Form In TPageControl Seems Disabled After Displaying Modal Form
« Reply #8 on: August 14, 2019, 10:06:31 pm »
Thanks again!

 

TinyPortal © 2005-2018