Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using styles in PyGTK

Using styles in PyGTK

Using styles in PyGTK

I am developing an application that will run on a PDA and it requires some special layouts and looks for the widgets. The PDA has a touch sensitive screen and the application is used by pressing on the display with the finger tips. Because of this I need to make some UI elements really big so that they are easy to click on. I also need to make some customization on the default widgets in order to create an optimal UI. In order to save effort I want the widgets to lay out and respond to interaction in the default way, but I want to entirely control the drawing of the widgets in each of their states. I want to write the entire application in Python. I am looking for answers to the following questions:

- I want to make a vertical scrollbar 40 pixels wide, so that it is easy to use with the finger tips. I find an attribute named "slider-width" listed in gtk.Range Style Properties in the GTK class reference. However, in the API reference I find no clue whatsoever on how to manipulate that value, or even in which construct it is stored in or how to read it. I need to know 1) how I can read the "slider-width" property of a gtk.VScrollbar and 2) how can I change the value.

- There is a class called gtk.Style which controlls the drawing of all basic widgets in a nice and efficient way. However, the PDA implementation of gtk.Style.paint_box() will draw only the right and bottom edges of the box. I would like to create my own Style implementation that would correct the problem, and also bring some additional visuality to the basic box. Is it possible to create such an own style? If I create a new own style it must inherit all attributes (such as colors) from the current default style. How do I implement the inheritance of the attributes?

- If I use my own gtk.Style instance, is there any way to set it as the default style in the application initialization? All widgets that would be created afterwards would then use the recently assigned new default style.

Thanks in advance!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close