comp.lang.ada
 help / color / mirror / Atom feed
* Gnoga: control over borders with nested views
@ 2014-11-10  0:07 Jeremiah
  2014-11-10  4:10 ` David Botton
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremiah @ 2014-11-10  0:07 UTC (permalink / 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?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnoga: control over borders with nested views
  2014-11-10  0:07 Gnoga: control over borders with nested views Jeremiah
@ 2014-11-10  4:10 ` David Botton
  2014-11-10  5:00   ` Jeremiah
  0 siblings, 1 reply; 3+ messages in thread
From: David Botton @ 2014-11-10  4:10 UTC (permalink / raw)


>    Main_View.Create(Window);
>    Parent_View.Create(Main_View);

   Parent_View.Overflow (Gnoga.Gui.Element.Hidden);
   --  This will cause the children to be "clipped" and contained in the Parent_View

>    Child1_View.Create(Parent_View);
>    Child2_View.Create(Parent_View);

...

    Parent_View.Border_Radius(Radius => "10%");


That should get you started.

Also consider joining the gnoga list - https://lists.sourceforge.net/lists/listinfo/gnoga-list

David Botton


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnoga: control over borders with nested views
  2014-11-10  4:10 ` David Botton
@ 2014-11-10  5:00   ` Jeremiah
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremiah @ 2014-11-10  5:00 UTC (permalink / raw)


On Sunday, November 9, 2014 11:10:24 PM UTC-5, David Botton wrote:
> >    Main_View.Create(Window);
> >    Parent_View.Create(Main_View);
> 
>    Parent_View.Overflow (Gnoga.Gui.Element.Hidden);
>    --  This will cause the children to be "clipped" and contained in the Parent_View
> 
> >    Child1_View.Create(Parent_View);
> >    Child2_View.Create(Parent_View);
> 
> ...
> 
>     Parent_View.Border_Radius(Radius => "10%");
> 
> 
> That should get you started.
> 
Thank you.  That does help.  

> Also consider joining the gnoga list - https://lists.sourceforge.net/lists/listinfo/gnoga-list

I've been meaning to.  I just need to figure out a good email for this stuff.  I already really hate that my email address is public here and I couldn't find any info on how email addresses are displayed within the list interface.  Mostly just OCD type stuff on my part.  I just have to decide on a good email name so I can move my posting here to it as well as join the gnoga list.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-10  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10  0:07 Gnoga: control over borders with nested views Jeremiah
2014-11-10  4:10 ` David Botton
2014-11-10  5:00   ` Jeremiah

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