Recent

Author Topic: StringGrid bug  (Read 3046 times)

GamerSK

  • Newbie
  • Posts: 1
StringGrid bug
« on: May 16, 2018, 10:13:05 pm »
Hi guys,

I have one problem with lazarus. The problem is in StringGrid. I used it for "database" and for Tic-tac-toe.
I using in database event OnSelectCell for edit cell and in game for add X or O but when I compile and run the program it automatic shows me inputbox which is in OnSelectCell procedure. You can see it all in this project:
(Labels are in Slovak language but you will understand it. I hope so) https://mega.nz/#F!fBdUGZIa!2Zz9_KKu4zmyTPpBLKMikw

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: StringGrid bug
« Reply #1 on: May 16, 2018, 10:34:49 pm »
Hi

The code is doing what you telling to do, in the on selectcell event of grid1 its calling inputbox( which displays the box...
if you want the grid to be editable then you set goediting to true in the options property of grid1; then you can enter text direct into cell.
if you want to execute some code when you finish editing the cell, you would put this code in the OnEditingDone event of grid1
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: StringGrid bug
« Reply #2 on: June 19, 2018, 07:37:35 am »
When reading, I've been thinking a lot of things. I get more knowledge.

After reading it. I know a lot of things and I like it a lot.

Is JanaRonnie someone preparing oneself for spam?

 

TinyPortal © 2005-2018