Sorry for taking so long....
The key here is that in the case of a grid, the grid will adjust to the
size of the contents. So to get around this place the canvas inside of a
view that has a set size and the Overflow property is set so that the view
containing the canvas will then have the scroll bars.
Also notice the use of Fill_Parent on the Views. This should prevent the
issue you are seeing of parts of the grid falling off the screen so to
speak. Since it insures the views take up room from the start in the grid.
David Botton
Try the following:
with Ada.Exceptions;
with Gnoga.Application.Singleton;
with Gnoga.Gui.Window;
with Gnoga.Gui.View.Console;
with Gnoga.Gui.View.Grid;
with Gnoga.Gui.Element.Common;
with Gnoga.Gui.Element.Canvas;
with Gnoga.Gui.Element.Canvas.Context_2D;
procedure dsp is
use Gnoga.Gui.View.Grid;
Main_Window : Gnoga.Gui.Window.Window_Type;
Layout_View : Gnoga.Gui.View.Grid.Grid_View_Type;
Text_View : Gnoga.Gui.View.Console.Console_View_Type;
Canvas_View : Gnoga.Gui.View.View_Type;
My_Canvas : Gnoga.Gui.Element.Canvas.Canvas_Type;
Start_Button : Gnoga.Gui.Element.Common.Button_Type;
begin
Gnoga.Application.Title ("dsp");
Gnoga.Application.HTML_On_Close
("<b>Connection to Application has been terminated</b>");
Gnoga.Application.Open_URL ("http://127.0.0.1:8080");
Gnoga.Application.Singleton.Initialize (Main_Window, Port => 8080);
Layout_View.Create (Parent => Main_Window,
Layout => ((1 => COL), (1 => COL), (1 => COL)));
Start_Button.Create (Layout_View.Panel (1, 1).all, "Start");
Canvas_View.Create (Layout_View.Panel (2, 1).all);
Canvas_View.Overflow (Gnoga.Gui.Element.Auto);
Canvas_View.Fill_Parent;
My_Canvas.Create (Canvas_View, 640, 480);
My_Canvas.Border;
Text_View.Create (Layout_View.Panel (3, 1).all);
Text_View.Fill_Parent;
for i in 1 .. 100 loop
Text_View.Put_Line ("Hello World!");
end loop;
Gnoga.Application.Singleton.Message_Loop;
exception
when E : others =>
Gnoga.Log (Ada.Exceptions.Exception_Name (E) & " - " &
Ada.Exceptions.Exception_Message (E));
end dsp;
On Sat, Feb 21, 2015 at 4:03 PM, Pascal <[email protected]> wrote:
> Hello,
>
> I created 3 areas:
> - buttons area
> - canvas area
> - text arrea
>
> I wrote:
> Main_Grid : Gnoga.Gui.View.Grid.Grid_View_Type;
> <...>
> Main_Grid.Create
> (Main_Window,
> ((1 => Gnoga.Gui.View.Grid.COL),
> (1 => Gnoga.Gui.View.Grid.COL),
> (1 => Gnoga.Gui.View.Grid.COL)));
>
> Then I created button:
> IntStartButton.Create (Main_Grid.Panel (1, 1), "Start");
> Canvas:
> Area_Canvas.Create (Main_Grid.Panel (2, 1), 640, 480);
> Console:
> IntConsoleView.Create(Main_Grid.Panel (3, 1));
>
> - when I shorten the window, all areas are not displayed
> - when I call put_line many times in text area then the button area is
> reduced by scrolling of text area and all text is not displayed
>
> How to get scrolling bars?
>
> I tried this with no success:
> IntConsoleView.Overflow(Gnoga.Gui.Element.Scroll);
>
> Thanks, Pascal.
> http://blady.pagesperso-orange.fr
>
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
> _______________________________________________
> Gnoga-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list