Almanova Sistemi ha scritto:
> Stefano Palmeri ha scritto:
>   
>> TableView1.Rows.Height = 2000
>>     
> Ok,
>  I have tried with your instuction during TableView_Data event and I get
> a "Stack Overflow" messages.
>
> Why?
>   
...because, apparently, changing the height of a row makes the tableview 
think it needs data again, so it fires a data event, which changes 
height, wich fires data event, which... ...fills up the stack.

One way to avoid this is to use a lock variable:

    private dontreenter as boolean

    public sub TableView_data(...)

      if dontreenter then return
      dontreenter = true
      ...
      ...
      dontreenter = false
    end sub


Take care to reset dontreenter in every occasion you exit the xxx_data() 
event handler.

Have fun with the stack...

Ciao,
Doriano



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to