discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: programmatic layout of controls


From: Fred Kiefer
Subject: Re: programmatic layout of controls
Date: Fri, 18 Aug 2023 18:14:25 +0200

I would expect that you need to provide a frame rectangle at least for the top 
level view but most likely very view will require one as otherwise it does not 
even know its start size.

> Am 18.08.2023 um 17:57 schrieb Tom Sheffler <tom.sheffler@gmail.com>:
> 
> Thanks Fred.
> 
> Indeed, that was a missing line!  
> Compiles now.  Do not see any views.
> Updated screenshot and description in repo.  Still not sure how to use this 
> correctly for layout.
> 
> Thanks,
> Tom
> 
> 
> On Fri, Aug 18, 2023 at 8:38 AM Fred Kiefer <fredkiefer@gmx.de> wrote:
> Hi Tom,
> 
> I had a very short look at your stack view test code and could not see where 
> you create the object `hbox`. This might be completely unrelated to the issue 
> you are having with that code but maybe it points you in the right direction.
> 
> Cheers,
> Fred
> 
> > Am 18.08.2023 um 15:32 schrieb Tom Sheffler <tom.sheffler@gmail.com>:
> > 
> > I wanted to create a tiny app with just a few controls and create a layout 
> > programmatically.  I began by testing NSGridView and NSStackView, but did 
> > not succeed with those.  In an older "tests-examples" project, I found some 
> > older programs that looked reasonable, so that took me down a path of using 
> > some older GNUstepGUI views.
> > 
> > FYI - my target environment is Linux, GCD, ARC, clang.
> > 
> > What I believe I found is the following:
> > - NSStackView is not ready for a completely programmatic layout.  
> > Constraint based layout is in the works but is not quite ready.
> > - GNUstepGUI GSHbox and GSVbox are sufficient, but introduce a compiler 
> > error when their headers are included in a file compiled with ARC.  There 
> > is a workaround.
> > - setting the positions of frames explicitly works and is actually pretty 
> > simple
> > 
> > What I found is that it's difficult to find some straightforward examples 
> > of layout that does not involve an Interface Builder of one form or another.
> > 
> > I put together some examples illustrating these successes and issues.  If 
> > you're interested in this topic, perhaps you can help create some simple 
> > examples of layout that work in a modern ObjC environment.
> > 
> > https://github.com/sheffler/gnustep-rowcol-layout-examples
> > 
> > Thanks,
> > Tom
> > 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]