Re: GUI building questions



Hi,

Chris W wrote:
? I down loaded it yesterday and made
this.

http://cdw.homelinux.com:8087/hp/rpn.jpg

but when I reopen the project or run it I get this

http://cdw.homelinux.com:8087/hp/rpn2.jpg

What I really want is something that looks more like this

http://cdw.homelinux.com:8087/hp/rpn3.jpg

which was done in C++ builder.

I tried setting the height and width of a few widgets, but that didn't
seem to do anything.  I also can't find anyway to change colors or font
size and type.

I'd put the buttons into a GtkTable for layout. You can set a cell horizontal and vertical padding which you should be able to adjust to get the spacing you want. Be aware that the user can change the font / display resolution / text direction behind your back, so you need to be quite flexible about how you handle resizes.

Colour and fonts are best set in a gtkrc file so the user can change it, rather than being wired into your app. Set names for your widgets and then write a gtkrc file like:

# style for button background
style "background_style" = "default"
{
       bg[NORMAL] = "#0"
}

widget "*background_widget" style "background_style"

Now anything called "background_widget" will be painted with a black background when in the normal state. You can set fonts in the same way.

 So far I have only tried to compile this stuff on linux
and it worked fine.  Will Borland C++ 5.02 work fine to compile this stuff?

You might try the gtk-win list for win32 tips.

John



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