UI - Docking question

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

I want to create 3 buttons, equal width when form is resized, static height,
how can I accomplish that with the docked property?

Java has a great UI layout tool, GridBagLayout, is there any equivalent in
C#?

Thanks in advance!

Derrick
 
Just trap the resize event of your form and change the buttons settings
there. Personally I think the java layout mechanism is a real PITA. I never
got something fancy to work with it.

Yves
 
phoenix said:
Just trap the resize event of your form and change the buttons settings
there. Personally I think the java layout mechanism is a real PITA. I never
got something fancy to work with it.

While I would agree that GridBagLayout is a PITA (although very useful
occasionally), the *general* Java layout stuff is *wonderful* (usually
sticking to BorderLayout, FlowLayout and GridLayout). It's something
I've missed in .NET right from the start. I've been assured multiple
times that it's all available, really, you just need to know what to
do. Unfortunately no examples really seem to do the right thing here,
so it's far from obvious how to proceed.

If you go back to Java at any stage, this page is a great tutorial on
layouts:

http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/

Clients shouldn't need to trap layout events and work out the logic
themselves. They should be able to express resize requirements and let
the framework do the right thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top