Double buffer. Create a second table that is hidden. Fill it in. Hide first
and show second. Can either delete the old one or recycle it.

David Botton
On Sat, Jul 4, 2015 at 12:20 PM Björn Lundin <b.f.lun...@gmail.com> wrote:

> Hi!
> I got a page that is driven by a task that
> updates 3 tables.
>
> The tables are first set to "" with
>
>    View.Daily_Table.Inner_HTML ("");
>
>
> then a header row is created
>       View.Daily_Table.Add_Caption("Last week's result @ " &
> Calendar2.Clock.To_String(Milliseconds => False));
>       View.Daily_Table.Border;
>
>       declare
>         Row  : Table_Row_Access := new Table_Row_Type;
>         Col1 : Table_Heading_Access := new Table_Heading_Type;
>         Col2 : Table_Heading_Access := new Table_Heading_Type;
>         Col3 : Table_Heading_Access := new Table_Heading_Type;
>       begin
>         Row.Dynamic;
>         Col1.Dynamic;
>         Col2.Dynamic;
>         Col3.Dynamic;
>         Row.Create (View.Daily_Table);
>         Col1.Create (Row.all, "Betname");
>         Col2.Create (Row.all, "Sum(Profit)");
>         Col3.Create (Row.all, "Date");
>       end;
>
> and then the rows are added
>
>       Select_Daily_Profit.Open_Cursor;
>       loop
>         Select_Daily_Profit.Fetch(Eos);
>         exit when Eos;
>         Select_Daily_Profit.Get("BETNAME", Betname);
>         Select_Daily_Profit.Get("SUMPROFIT", Sumprofit);
>         Select_Daily_Profit.Get_Date("DATE", Date);
>         declare
>            Row  : Table_Row_Access := new Table_Row_Type;
>            Col1 : Table_Column_Access := new Table_Column_Type;
>            Col2 : Table_Column_Access := new Table_Column_Type;
>            Col3 : Table_Column_Access := new Table_Column_Type;
>         begin
>            Cnt := Cnt +1;
>            Row.Dynamic;
>            Col1.Dynamic;
>            Col2.Dynamic;
>            Col3.Dynamic;
>            Row.Create (View.Daily_Table);
>            if Cnt mod 2 = Integer_4(0) then
>              Row.Background_Color("skyblue");
>            end if;
>            Col1.Create (Row.all, Utils.Trim(Betname));
>            Col2.Create (Row.all, Utils.F8_Image(Sumprofit));
>            if Sumprofit < 0.0 then
>              Col2.Background_Color("red");
>            else
>              Col2.Background_Color("palegreen");
>            end if;
>            Col3.Create (Row.all, Date.String_Date_ISO);
>            Col2.Text_Alignment(Gnoga.Gui.Element.Right);
>         end;
>       end loop;
>       Select_Daily_Profit.Close_Cursor;
>
>
> This pattern is repeated for 3 tables with different data.
> Now - it works.
> But you see the tables disappear and the reappear, somewhat slowly.
> And it's a bit annoying, since it is a monitoring screen.
>
> I'd like the update to be without flickering. Is there a better way of
> updating tables?
>
> --
> Björn
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to