Re: [PHP-GTK] Help with treeview

[email protected] (bob majdak jr)
Newsgroups php.gtk.general
Organization KateOS
Message-ID <[email protected]>
� wrote:
> 1. How can I get an event when the user clicks with the right mouse
> button over a row? I want to show a popup menu in this case.

not sure if there is a shorter way for this, if i recall correctly i tried several things and this 
is what worked the best:

this->connect('button-press-event',array($this,'on_click'));
public function on_click($widget,$event) {
	if($event->button == 3) {
		//. popup() a GtkMenu
	}
}

> 2. How can I change the identation(increase the distance to the right
> that a child is from the parent?

i do not know.

> 3. How can I make the appereance more like a tree in kde/windows? I mean
> use +/- to collapse and expand and draw the lines to show the parent of
> a item. What i want is make it see like a GtkCTree in php-gtk1?

i think you would have to write your own gtkrc and force it upon the application, because this is 
determined by the users theme. however in my opinion you probably should not be over ruleing their 
theme (especially linux users) because they expect the application to look a certain way like others 
using gtk.

> 4. How can I toggle the state? I mean if a row is colapsed, i want
> expand and if expanded I want to collapse?

there are expand methods but gtk.php.net seems to be down, i'll reply with those when i can get in 
(unless you find it first)

- bob.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.