[fpc-pascal]Newbie question: fpc + gtk + clist SOLVED!!

Eduardo Lopez edulopez at hotpop.com
Fri Dec 19 18:08:22 CET 2003

It seems that nobody care ;-) , but this is the solution that I find:

1)  Apply to the Clist the attribute GTK_SELECTION_BROWSE
2)  Added a global variable that contain the row number selected (filled 
by the procedure that handle the signal of the Clist)
3) In the "form" , first read the correspnding row selected -using my 
variable- and fill the entry widgets...


Eduardo Lopez wrote:

> Hello all:
> 1st. Sorry about my english :-)
> I'm trying to develop an GUI application with fpc and gtk. And I begin 
> exploring and extending the examples.
> I'm working with clist.pp and added three buttons: Insert, Change, 
> Delete. The goal is that the user press anyone and display a 
> convenient form to update de record.
> In the example, there is a procedure "selection_made" that respond to 
> the signal  "clicked" in the list, and it reads the list and retrieve 
> the data.
> The question is: How can I get the same data when the user press the 
> Change button. I can connect a signal to the Change button, but I need 
> to know the row that is selected in the list  to read his data.
> The secuence is:
> 1- The user select a row with click ( or just browsing the list )
> 2- The use click in the button Change/Delete to update the record.
> Thanks in advance.
> Eduardo
> ---
> edulopez at hotpop.com
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list