How can I add a left-aligned button to Dialog?

View: New views
2 Messages — Rating Filter:   Alert me  

How can I add a left-aligned button to Dialog?

by thura :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am writing a dialog, in which the "close" button is aligned to the left, like other gtk+ applications.
But I haven't found a way how to do it. Any clues?

Thura

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
java-gnome-developer mailing list
java-gnome-developer@...
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer

Re: How can I add a left-aligned button to Dialog?

by Andrew Cowie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 2009-10-31 at 14:03 -0500, Thura wrote:
> I am writing a dialog, in which the "close" button is aligned to the
> left, like other gtk+ applications.

It's a HIG requirement.

More accurately, dialogs in GNOME user interfaces all have their common
case, go forward action being the right-most, while which button is set
as default (ie, what happens if you press Enter) depends on the
severity.

Anyway,

> But I haven't found a way how to do it.

Sounds like you want MessageDialog. It's easy enough to drive, but we
have some useful subclasses which make it even easier to Do The Right
Thing.

Have a look at QuestionMessageDialog:
http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/QuestionMessageDialog.html

or more likely WarningMessageDialog:
http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/WarningMessageDialog.html
[hm, that needs a screenshot. Anyone want to contribute?]

should do the trick for you.

Good luck!

AfC
Sydney



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
java-gnome-developer mailing list
java-gnome-developer@...
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer

signature.asc (204 bytes) Download Attachment