[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Re: Dynamicly styling a widget
From:       Ben Iofel <iofelben () gmail ! com>
Date:       2016-08-26 17:56:11
Message-ID: CADUWmnnK_J8-88QMTggaqFVCMVW0aSsRf+p4-1H74tBLPNiz+w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I think you want a GtkGrid

On Fri, Aug 26, 2016, 8:04 AM Jim Heald <jhdoubleoseven@gmail.com> wrote:

> Hm, yeah. I don't think a treeview is what I want and I'm not entirely
> sure an Event Box is the way to go -- I only chose it because it can have
> its own background color and can hopefully respond to a double click.
>
> If I want to generate a layout that looks like the flowchart I linked to
> in the first post, can someone suggest how I should model it? Whatever
> widget I use for the tile needs to be aware of what year column it's in and
> what quarter sub-column, and change its state appropriately when dragged to
> a new place.
>
> On Aug 26, 2016 04:43, "Hrvoje Niksic" <hrvoje.niksic@avl.com> wrote:
>
>> On 08/25/2016 08:32 PM, Jim Heald wrote:
>>
>>> Hi there,
>>>
>>> I'm having a rough time figuring out how I can work with colors in Gtk+.
>>> I'll provide a rundown of what I'm trying to accomplish:
>>>
>>> I'm going to have a TreeView which will have Eventboxes as children.
>>>
>>
>> A tree view is not a container with children. (Technically it is a
>> container, but only because it contains the header and bin windows.)
>>
>> To draw stuff in a tree view, use appropriately styled "renderers". To
>> react to events on the tree view, catch the event on the tree view widget
>> itself, and call gtk_tree_view_get_path_at_pos to determine where the event
>> happened.
>>
>> _______________________________________________
>> gtk-list mailing list
>> gtk-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>>
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>

[Attachment #5 (text/html)]

<p dir="ltr">I think you want a GtkGrid</p>
<br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 26, 2016, 8:04 AM Jim Heald \
&lt;<a href="mailto:jhdoubleoseven@gmail.com">jhdoubleoseven@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hm, yeah. I don&#39;t \
think a treeview is what I want and I&#39;m not entirely sure an Event Box is the way \
to go -- I only chose it because it can have its own background color and can \
hopefully respond to a double click.</p> <p dir="ltr">If I want to generate a layout \
that looks like the flowchart I linked to in the first post, can someone suggest how \
I should model it? Whatever widget I use for the tile needs to be aware of what year \
column it&#39;s in and what quarter sub-column, and change its state appropriately \
when dragged to a new place.</p> <div class="gmail_extra"><br><div \
class="gmail_quote">On Aug 26, 2016 04:43, &quot;Hrvoje Niksic&quot; &lt;<a \
href="mailto:hrvoje.niksic@avl.com" target="_blank">hrvoje.niksic@avl.com</a>&gt; \
wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/25/2016 08:32 PM, Jim Heald \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"> Hi there,<br>
<br>
I&#39;m having a rough time figuring out how I can work with colors in Gtk+.<br>
I&#39;ll provide a rundown of what I&#39;m trying to accomplish:<br>
<br>
I&#39;m going to have a TreeView which will have Eventboxes as children.<br>
</blockquote>
<br>
A tree view is not a container with children. (Technically it is a container, but \
only because it contains the header and bin windows.)<br> <br>
To draw stuff in a tree view, use appropriately styled &quot;renderers&quot;. To \
react to events on the tree view, catch the event on the tree view widget itself, and \
call gtk_tree_view_get_path_at_pos to determine where the event happened.<br> <br>
_______________________________________________<br>
gtk-list mailing list<br>
<a href="mailto:gtk-list@gnome.org" target="_blank">gtk-list@gnome.org</a><br>
<a href="https://mail.gnome.org/mailman/listinfo/gtk-list" rel="noreferrer" \
target="_blank">https://mail.gnome.org/mailman/listinfo/gtk-list</a><br> \
</blockquote></div></div> _______________________________________________<br>
gtk-list mailing list<br>
<a href="mailto:gtk-list@gnome.org" target="_blank">gtk-list@gnome.org</a><br>
<a href="https://mail.gnome.org/mailman/listinfo/gtk-list" rel="noreferrer" \
target="_blank">https://mail.gnome.org/mailman/listinfo/gtk-list</a><br> \
</blockquote></div>



_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic