comp.lang.ada
 help / color / mirror / Atom feed
From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Gnoga: control over borders with nested views
Date: Sun, 9 Nov 2014 16:07:40 -0800 (PST)
Date: 2014-11-09T16:07:40-08:00	[thread overview]
Message-ID: <77ce9e26-2bdd-4703-b078-7d38433447f2@googlegroups.com> (raw)

I've been trying to create some complex views and having trouble figuring out how to manipulate some properties such as border radius.  Below is some scaled down code to at least show a minimum problem set.

with Ada.Text_IO;  use Ada.Text_IO;

with Gnoga.Application.Singleton;
with Gnoga.Gui.Window;
with Gnoga.Gui.View;
with Gnoga.Gui.Element.Common;

procedure Main is
   Window : Gnoga.Gui.Window.Window_Type;
   Main_View : Gnoga.Gui.View.View_Type;
   Parent_View : Gnoga.Gui.View.View_Type;
   Child1_View : aliased Gnoga.Gui.View.View_Type;
   Child2_View : aliased Gnoga.Gui.View.View_Type;
   Child1_Button : Gnoga.Gui.Element.Common.Button_Type;
   Child2_Button : Gnoga.Gui.Element.Common.Button_Type;
   
begin
   Put_Line("Hello World");   
   Gnoga.Application.Title("Gnoga Test App");
   Gnoga.Application.Open_URL_Windows;
   Gnoga.Application.Singleton.Initialize(Main_Window => Window);
   Put_line("Application Started");
   
   
   Main_View.Create(Window);
   Parent_View.Create(Main_View);
   Child1_View.Create(Parent_View);
   Child2_View.Create(Parent_View);
   Child1_Button.Create(Child1_View,"Button 1");
   Child2_Button.Create(Child2_View,"Button 2");
   
   
   
   Parent_View.Height(250);
   Parent_View.Width(500);
   Child1_View.Background_Color("Red");
   Child2_View.Background_Color("Green");
   Parent_View.Border;
   Child1_View.Border;
   Child2_View.Border;
   Parent_View.Border_Radius(Radius => "50");
   
   
   Put_Line("Waiting on App to close");
   Gnoga.Application.Singleton.Message_Loop;
   
   Put_Line("Application Finished");
   
   
   
end Main;


The problem is that 

Parent_View.Border_Radius(Radius => "50");

Does nothing.  I want to round out the edges of some of my views while still having their inner views fill to match and show their borders as well.  

I've tried playing with the numbers, but it doesn't seem to effect.  Looking at the documentation in the Gnoga code base, all I have as options for radius are Radius = length|%|initial|inhert, but none of those seem to do anything useful for me.

I've also experimented using Docker_View as well but with the same results.

I am sure I am doing something silly.  Does anyone have any insight or advice for how to control the border radius of a parent view vs its child views?


             reply	other threads:[~2014-11-10  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  0:07 Jeremiah [this message]
2014-11-10  4:10 ` Gnoga: control over borders with nested views David Botton
2014-11-10  5:00   ` Jeremiah
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox