Author Topic: Can I ask a Dumb Questions?  (Read 2769 times)


  • Hero Member
  • *****
  • Posts: 700
Re: Can I ask a Dumb Questions?
« Reply #15 on: January 31, 2018, 09:58:48 pm »

Just attached a project that may help.

It has 2 forms, form 1 modifies labels on form2, form 2 modifies memo on form 1 by using events or procedures with the form 1 unit.
form 1 receives the modelresult from form 2 and displays the seult on a label.

hopefully it may help.  Not the most elegent
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.


  • Hero Member
  • *****
  • Posts: 3333
Re: Can I ask a Dumb Questions?
« Reply #16 on: January 31, 2018, 10:09:19 pm »
OK - I see Modalresult on Button1.

However; on Form2 the buttons are in a panel and I cannot see a property on the OK button of ModalResult which I would expect. Or one on the Cancel Button.
TButtonPanel(form2) is a component where the buttons are pre-configured: Help, Close, Ok and Cancel. The ModalResult property is not published(not visible in OI), but you still can access it if necessary from code:
Code: Pascal  [Select]
  1. ButtonPanel1.OKButton.ModalResult := mrNone;