ComboBox displaying data from a TreeStore
- From: Tiberius Duluman <tiberius duluman gmail com>
- To: gtk-app-devel-list gnome org
- Subject: ComboBox displaying data from a TreeStore
- Date: Tue, 15 Apr 2008 23:34:55 +0300
Hello
I have one question about a ComboBox displaying data from a TreeStore.
How can I make it to display the entire path? For example, when a
child is selected, I want it to display something like "/item n/subitem
c/subitem xx"
In the application that I'm working to, display only child name, the way
ComboBox
is doing now, would be very confusing. ( for example, displaying only
"subitem xx" )
I've tried to make a custom CellRenderer, but there is a problem:
when the popup is displayed, it displays every item with the entire path.
For example, I open "item n" item and inside of it I want to see an item
"subitem c",
but with the custom CellRenderer, the subitem is rendered as "/item
n/subitem c".
I'm thinking to write a custom widget inherited from ComboBox, and
overriding
the on_expose_event, but I have no idea how to determine the rectangle
where I
should render the text; I don't want to overwrite it over the arrow.
Does anybody have any idea how can I solve this problem?
Thank you
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]