Author Topic: Layout for interface  (Read 5120 times)

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Layout for interface
« on: 2011 January 20 12:47:07 »
I've seen a number of ways to control the layout of the interface - which of the modules should I use as a best practices example? 

Right now this looks like sh*t.  I've attached a screen shot of the current progress, and I am not happy with how random the layout is. 

Maybe the answer will just be - you have to tweak it/season to taste....

But I'd really like to know if there is a little more of a baseline I can setup AND then tweak to my liking...

I hope that made some sense.
David Raphael

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Layout for interface
« Reply #1 on: 2011 January 20 13:45:16 »
The best way to go ussually is to work over something it is working ;)

To keep things better organized I would use GroupBoxes. Also the Sizers let you organizaze things.
If you use Labels, make sure to use the SetFixedWidth( int ) function to force them all to have the same size. Define that at the start, as a variable as here: int labelWidth1 = fnt.Width( String( "Mechanical stimulus application frame:" ) + 'T' );

Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Layout for interface
« Reply #2 on: 2011 January 20 14:07:53 »
That was a huge help.  I have more to fix, but that really fixed the label alignment that was driving me nuts...
David Raphael

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Layout for interface
« Reply #3 on: 2011 January 20 19:15:04 »
Ok - I'm stuck on this one now - I can't get these buttons to align to the top of the VerticalSizer...




David Raphael

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Layout for interface
« Reply #4 on: 2011 January 20 19:19:17 »
And of course...I figure it out 1 minute after posting...

Code: [Select]
CameraListButtons_Sizer.AddStretch();

seems to fix the problem.
David Raphael

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layout for interface
« Reply #5 on: 2011 January 21 03:36:14 »
Very nice David :)

You need some more horizontal spacing between the vertical sizers but it's looking really nice. Good!  8)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/