On Jun 27, 2007, at 9:30 PM, Brendan Barnwell wrote:

>>      Of all the UI controls, dListControl has probably gotten the least
>> attention. I haven't looked at that code in ages.
>
>       I see.  Does this mean I should try to find some other widget to  
> use, or just
> that it may be awhile before anything gets fixed?

        Not exactly. It's more like with limited resources, the squeaky  
wheels get the first greasing. Since neither Paul or I have needed  
the control, and no one on the list has complained about it, we've  
focused on other things. But now that you've brought it up, it's  
probably time to spend some time on it.

>       Actually, let me expand a bit on what I'm trying to do, and maybe  
> you can
> suggest how to do it with Dabo.  I want an interface like the one  
> in the
> screenshot at http://www.brenbarn.net/misc/monoconc.png
>
>       I'm not too worried about the two-pane design; the demos seem to  
> indicate Dabo
> can handle that fine.

        dSplitter is what you need.

> What I'm most interested in is that lower pane, where you
> see all the sentences aligned on the word "stuff".  The following  
> features are
> key here:
>
>       1) The user can select one line at a time from this window.  I  
> need to be able
> to hook into the select event to update the display in the upper  
> pane to scroll
> to the appropriate place in the file.  This is why I originally tried
> dListControl, because it seemed the closest thing to this control.

        This can be handled by dListControl, dListBox, or dGrid.

>       2) I can style the text that's displayed.  It's not clear to me if  
> this is
> possible with dListControl.  I see that I can set properties like  
> color for a
> list item as a whole, but not for individual pieces in the list.

        Both dListControl and dGrid can color individual rows. dGrid could  
do the sort of coloring depicted in that image, but you'd need to  
create a custom renderer class.

>       3) I can align the text in a custom way.

        Supposedly this is possible with dGrid, but I haven't had success,  
even working at the wxPython level. I don't see anything in the  
wx.ListCtrl that will allow this.

>       I'm sort of wondering if I should be using a grid instead, so I  
> can separate
> out that middle word ("stuff" in the screenshot) to style the text  
> and align,
> but I don't want any extraneous gridlines or column headers.

        No problem.

        grd.ShowCellBorders = grd.ShowColumnLabels = False.

> Each line in the "table" should appear as a continuous string of text.

        Just make a single column, and set col.Expand = True.

> Also, I need to hook into
> the grid so I can preprocess the text before it's displayed,  
> because it also
> contains custom markup tags that I want to strip out from the  
> display (or not
> --- I want the user to be able to toggle this option).

        This would fall into the realm of a custom renderer.

> From what I've seen it
> looks like I'd be able to do this but I haven't really looked into  
> how.  For now
> I'm just trying to get the interface straight.
>
>       So is a dListControl the right tool for this job, or should I be  
> using a grid
> somehow?

        Sounds like neither is perfect, but that you'd come closer with a grid.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to