Re: [gtk-list] Re: GtkCTree.... again
- From: Andy Connor <amc50 eng cam ac uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: GtkCTree.... again
- Date: Thu, 07 Oct 1999 10:36:18 +0000
Lee Mallabone wrote:
>
> The following code fragment hopefully illustrates what I mean.
>
> gchar *node_label[2]
> GtkCTreeNode *root;
> GtkCTree *the_tree;
>
> node_label[0] = "Root Node, column 1";
> node_label[1] = "Root Node, column 2";
>
> the_tree = gtk_ctree_new(2,1);
> root = gtk_ctree_insert_node(GTK_CTREE(the_tree), NULL, NULL,
> node_label,
> 0, NULL, NULL, NULL,
> NULL, FALSE, FALSE);
>
> Where you can substitute any of the other arguments in gtk_ctree_insert_node
> for whatever's most appropriate.
>
> Hope that helps,
>
Getting there, slowly... but a few more questions.
Firstly, the return of the function gtk_ctree_new() is GtkWidget* rather
than GtkCTree* - so do I have to get around this with typecasting?
Secondly, If I want to display the Ctree in a scrolled window, I would
try to use the function gtk_scrolled_window_add_with_viewport() but
again run into problems with type. Is this the right function to use?
If I change the type of 'the_tree' then I can get everything to compile,
but can't get the ctree to be viewed.
Thanks,
Andy
PS When I've struggled my way through this then I will make the
resulting code available to anyone else having problems.
--
Andy Connor
Research Associate, Cambridge Engineering Design Centre
http://www.cus.cam.ac.uk/~amc50/home.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]