Recent

Author Topic: BINGO application.  (Read 590 times)

seghele0

  • Full Member
  • ***
  • Posts: 222
BINGO application.
« on: September 08, 2024, 03:16:31 pm »
The BINGO program is almost finished.
Have a problem with the EXIT button when the form is maximized.
The EXIT button keeps moving to the left, the other objects remain in place.
Does anyone have a solution please?
 ;)

dseligo

  • Hero Member
  • *****
  • Posts: 1361
Re: BINGO application.
« Reply #1 on: September 08, 2024, 04:52:11 pm »
You have discrepancy between Unit1.pas and Unit1.lfm (code and form).
In your Unit1.pas you don't have declaration for PanelBtnEXIT, so add it, ie. in line 27:
Code: Pascal  [Select][+][-]
  1. type
  2.   { TForm1 }
  3.   TForm1 = class(TForm)
  4.     BtnEXIT: TButton;
  5.     BtnGenerate: TButton;
  6.     BtnRestart: TSpeedButton;
  7.     LabelCLOCK: TLabel;
  8.     PanelTOPgrid: TPanel;
  9.     PanelLEFTgrid: TPanel;
  10.     PanelTIME: TPanel;
  11.     PanelBtnEXIResetGameT: TPanel;
  12.     PanelBtnRestart: TPanel;
  13.     PanelBtnNEW: TPanel;
  14.     PanelNUMBER: TPanel;
  15.     PanelStringGrid: TPanel;
  16.     PanelButtons: TPanel;
  17.     PanelBtnEXIT: TPanel; // <-- add this line
  18. ...

Then change line 133 from BtnExit.SetBounds to:
Code: Pascal  [Select][+][-]
  1.   PanelBtnEXIT.SetBounds // <-- change this line
  2.    (PanelBtnNew.Left + PanelBtnNew.Width + Spacing,
  3.    (PanelButtons.Height - ControlHeight) div 2, BtnWidth + 50, ControlHeight -20);

I didn't check if you are missing some other declarations from form. Normally, form and source are synchronized.

P.S.: added explanation in code and comment at the end.
« Last Edit: September 08, 2024, 04:55:19 pm by dseligo »

seghele0

  • Full Member
  • ***
  • Posts: 222
Re: BINGO application.
« Reply #2 on: September 08, 2024, 06:49:49 pm »
Thank you for the fast support with the correct code.
It works now.
I still have a lot to learn.
Fortunately, I can count on real support on this forum.
(Still working on the program.)
 :)

seghele0

  • Full Member
  • ***
  • Posts: 222
Re: BINGO application.
« Reply #3 on: September 24, 2024, 05:03:19 pm »
In attachment I leave the finished version of my BINGO application to all Pascal-Lazarus sympathizers.
Thanks for the great help from this forum and that of NL-Delphi.
Enjoy the program(FREE).
 ;)

Thaddy

  • Hero Member
  • *****
  • Posts: 15639
  • Censorship about opinions does not belong here.
Re: BINGO application.
« Reply #4 on: September 24, 2024, 05:12:54 pm »
I will send you my code too, but somehow I forgot to do that. Sorry. I will leave it up to you to decide what's best.
If I smell bad code it usually is bad code and that includes my own code.

seghele0

  • Full Member
  • ***
  • Posts: 222
Re: BINGO application.
« Reply #5 on: September 24, 2024, 06:15:44 pm »
Thaddy
I hope you will really forward the program
Thanks already.
 :D

seghele0

  • Full Member
  • ***
  • Posts: 222
Re: BINGO application.
« Reply #6 on: September 25, 2024, 10:41:17 am »

Thaddy,

Apparently your promised application 'Bingo' has gotten stuck somewhere.
 :(
I'm really curious to discover your results.


seghele0

  • Full Member
  • ***
  • Posts: 222
Re: BINGO application.
« Reply #7 on: October 01, 2024, 05:50:57 pm »
"Thaddy"
This is my final request to forward your application of "BINGO" to the forum.
You've already promised it twice.
 :o
Thanks in advance.


 

TinyPortal © 2005-2018