Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Using trees for a compact grid?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alex Vincent  
View profile  
 More options Jan 19, 2:52 pm
Newsgroups: mozilla.dev.tech.xul
From: Alex Vincent <ajvinc...@gmail.com>
Date: Mon, 19 Jan 2009 11:52:11 -0800
Local: Mon, Jan 19 2009 2:52 pm
Subject: Using trees for a compact grid?
I've been thinking a lot lately about the tree and grid widgets in XUL -
  each has its uses.  With grids, you can put in just about any XUL
element you want in each cell of the grid.  With trees, you're more
limited - single-line textboxes, progress meters, and "cyclers" - but
the tree widget takes up a lot less space on the screen for the same
amount of information, and is easier to navigate with keystrokes.

I'd like to combine the best of both:  a grid-like layout of rows and
columns, but in the compact space of a tree widget.

I've been thinking about three options:

(1) A grid element binding with much tighter spacing between elements,
largely dictated by CSS rules and tree-inspired navigation controls.

(2) A tree element binding with carefully positioned and sized XUL
controls, like the inputField property does for editable text cells.

(3) Modifications to the tree layout code to support additional types of
controls.

Of these three options, I like #2 the best.  The tree binding already
supports editable text cells by directly positioning a textbox over the
cell which the user would edit.  If I could do the same with other
controls (radio button, regular XUL button, menulist immediately come to
mind), and make them move (and hide) along with the tree widget's own
scrollable content, then I'd basically have that compact grid I'm
looking for.  In addition, by using a custom nsITreeView, I wouldn't
need as many XUL elements as I'd need for a grid.  Finally, by using
special "properties" attribute settings that can't become part of a CSS
selector, I could specify whether the control was visible all the time,
while focused, or while activated.

I'm wondering if this really is the best approach, or if I'm overlooking
something.  I'm also looking for best practices on implementing this
compacted grid widget in XBL.

Suggestions?

Alex


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Finkle  
View profile  
 More options Jan 19, 11:26 pm
Newsgroups: mozilla.dev.tech.xul
From: Mark Finkle <mark.fin...@gmail.com>
Date: Mon, 19 Jan 2009 20:26:05 -0800 (PST)
Local: Mon, Jan 19 2009 11:26 pm
Subject: Re: Using trees for a compact grid?
On Jan 19, 2:52 pm, Alex Vincent <ajvinc...@gmail.com> wrote:

> I'd like to combine the best of both:  a grid-like layout of rows and
> columns, but in the compact space of a tree widget.

> I've been thinking about three options:

> (1) A grid element binding with much tighter spacing between elements,
> largely dictated by CSS rules and tree-inspired navigation controls.

> (2) A tree element binding with carefully positioned and sized XUL
> controls, like the inputField property does for editable text cells.

> (3) Modifications to the tree layout code to support additional types of
> controls.

Personally, I'd stick to grids for a traditional group of controls in
a dialog (or window). Seems like much less overhead. Tree might be
useful when dealing with many "rows" of the same group of controls,
just bound with different data. There is already a bug and patch for
adding richer content to trees:
https://bugzilla.mozilla.org/show_bug.cgi?id=441414

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Deakin  
View profile  
 More options Jan 20, 7:51 am
Newsgroups: mozilla.dev.tech.xul
From: Neil Deakin <enndea...@sympatico.ca>
Date: Tue, 20 Jan 2009 07:51:56 -0500
Local: Tues, Jan 20 2009 7:51 am
Subject: Re: Using trees for a compact grid?

Alex Vincent wrote:
> I'd like to combine the best of both:  a grid-like layout of rows and
> columns, but in the compact space of a tree widget.

It really depends on what you are trying to do. If you need a
hierarchical list, or a row-oriented list with many rows, then a tree is
what is desired.

In the future, my current plan is to expand richlistbox (and grids in
general) to support multiple columns with resizing, dragging, etc. Doing
this, though, requires changes to the grid layout code.

> (1) A grid element binding with much tighter spacing between elements,
> largely dictated by CSS rules and tree-inspired navigation controls.

Note that its actually the margins around the elements that create the
spacing, not the grid. The grid doesn't impose any spacing itself.

> (2) A tree element binding with carefully positioned and sized XUL
> controls, like the inputField property does for editable text cells.

> (3) Modifications to the tree layout code to support additional types of
> controls.

I made an attempt in the tree layout code to something like 2 and 3, but
its one of those things where some of it easy but getting it right is
hard. Handling scrolling (horizontal too) as well as painting is harder.

Really you need to decide which features you really need:
hierarchies, column redordering/sizing, row or cell selection, large
amounts of data, complex styles, arbitrary elements, etc.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google