Recent

Author Topic: Cannot open my form after change columns in DBGrid  (Read 1741 times)

Unvictis

  • New Member
  • *
  • Posts: 13
  • Nihil habeo, nihil timeo
Cannot open my form after change columns in DBGrid
« on: May 27, 2017, 01:02:53 am »
Good afternoon guys! I can not open the form of my application, after changing the Columns property via IDE, and reopen project/IDE. Lazarus writes: "Division by zero." Can you please tell me how to solve this problem?

Lazarus: 1.6.4 x32, SVN: 54278
OS: Windows 10 Home x64

sky_khan

  • Guest
Re: Cannot open my form after change columns in DBGrid
« Reply #1 on: May 27, 2017, 02:06:42 am »
This is why you should use a version control software like git/mercurial/svn. You could diff the files and notice the bug yourself.
Your lfm file has out of range Width and Height values like 106880,186880 in two places. You should fix them by hand, outside of lazarus.

Handoko

  • Hero Member
  • *****
  • Posts: 3913
  • My goal: build my own game engine using Lazarus
Re: Cannot open my form after change columns in DBGrid
« Reply #2 on: May 27, 2017, 04:47:20 am »
I tested the files and as mentioned it can be fixed by changing those values. There are 4 lines in fiskra.lfm that needed to be changed:

- line 227: ClientHeight = 106880
- line 228: ClientWidth = 186880
- line 325: ClientHeight = 106880
- line 326: ClientWidth = 186880

 

TinyPortal © 2005-2018