Active Topics

 


Reply
Thread Tools
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#11
It's just a typo when creating the third column, instead of markup=1, it should be markup=2
 

The Following User Says Thank You to yerga For This Useful Post:
Posts: 7 | Thanked: 0 times | Joined on May 2008
#12
Oh great. Thank you. Frankly, I didn't know the number after markup= denotes the column. I somehow thought it's sort of boolean.

Great, I can now go on.
 
Posts: 7 | Thanked: 0 times | Joined on May 2008
#13
Originally Posted by yerga View Post
It's just a typo when creating the third column, instead of markup=1, it should be markup=2
Next problem I'm facing. I'm opening a StackableWindow, where I put the PannableArea including GtkTreeview with three columns as I showed in the code snippet on last page.

When I populate the treeview, the columns expand beyond the screen width, if the track names are too long. How could I request the treeview (or pannablearea) to always fit to screen width?
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#14
Originally Posted by hmaki View Post
Next problem I'm facing. I'm opening a StackableWindow, where I put the PannableArea including GtkTreeview with three columns as I showed in the code snippet on last page.

When I populate the treeview, the columns expand beyond the screen width, if the track names are too long. How could I request the treeview (or pannablearea) to always fit to screen width?
You have some properties for gtk.CellRendererText: "wrap-mode", "wrap-width" and "ellipsize"

It can also be useful the set_sizing() and set_fixed_width() methods of the gtk.TreeViewColumn.

Play with that until that you find the best way to show the text.
__________________
Daniel Martín Yerga
maemo.org profile
Twitter
 
dwould's Avatar
Posts: 529 | Thanked: 262 times | Joined on Dec 2008 @ Eastleigh, Hampshire, UK
#15
This thread was pretty helpful to me as I was playing last night, but one thing I've not got... I don't see the little lines dividing the cells in my list as are shown in all the screen shots here.
Is there some special step I need to take to get them to show up?
__________________
----------
N900
http://danielwould.wordpress.com
Check out Witter, a twitter client for N900
http://danielwould.wordpress.com/witter

If Witter isn't working for you, eg crashes/doesn't start, gives errors etc etc. Please run it from x-term using:
run-standalone.sh python2.5 /opt/witter/witter.py

This will generate diagnostic output. Without this I cannot help you.
 
demiurgus's Avatar
Posts: 40 | Thanked: 86 times | Joined on Dec 2009 @ Sweden
#16
Originally Posted by dwould View Post
This thread was pretty helpful to me as I was playing last night, but one thing I've not got... I don't see the little lines dividing the cells in my list as are shown in all the screen shots here.
Is there some special step I need to take to get them to show up?
Yes, I'd really like to know this as well. I've been searching docs and code and trying a lot of things but haven't yet been able to produce any row delimiting lines... please give us a hint...
 
dwould's Avatar
Posts: 529 | Thanked: 262 times | Joined on Dec 2008 @ Eastleigh, Hampshire, UK
#17
*Bump*
I was looking again at this, and I cannot for the life of me get the dividing lines to show up, I've set every property I can think of, and played with overriding gtk rc style stuff, but at best I get a dividing line which is the same colour as the background ;-(

help?
__________________
----------
N900
http://danielwould.wordpress.com
Check out Witter, a twitter client for N900
http://danielwould.wordpress.com/witter

If Witter isn't working for you, eg crashes/doesn't start, gives errors etc etc. Please run it from x-term using:
run-standalone.sh python2.5 /opt/witter/witter.py

This will generate diagnostic output. Without this I cannot help you.
 
fredrik_wendt's Avatar
Posts: 43 | Thanked: 28 times | Joined on Nov 2009 @ Göteborg, Sweden
#18
Originally Posted by mattaustin View Post
Although I have dabbled in python, it's my first time playing with anything GTK/GUI related.

I have created and populated a treeview no problems - mostly thanks to the info above (thanks!).

Are there any example of how to filter the treeview when the user types on the keyboard? Kind-of how the contacts list works. I hope its easy, as I am only just getting the hang of what I've done already!

Cheers!
Hermes uses something like this here: https://garage.maemo.org/plugins/ggi...4d077f5f3f8e15

Hope this helps!
 
Reply

Tags
gtk, list, maemo 5, unknown widgets


 
Forum Jump


All times are GMT. The time now is 14:31.