At Thu, 23 Jul 2015 19:57:52 -0700 (PDT), copycat wrote:
> On Thursday, July 23, 2015 at 2:50:37 PM UTC+8, copycat wrote:
> > With a list box, i can select multiple items by holding onto my mouse and 
> dragging. I'll like to add on other features to the list box like being able 
> to drag the rows to reorder them, or to change the list-box values directly 
> by 
> clicking and editing. How can i do this? I'm not sure where in the code i can 
> change the behavior of on-subwindow-event to include this feature. 
> > 
> > (define/augment on-subwindow-event receiver event) also doesn't work.
> 
> After looking a bit i found this:
> 
> https://developer.gnome.org/gtk2/stable/gtk2-GtkTreeView-drag-and-drop.html
> 
> I am willing to try my hand at it. Would it be possible for me to edit
>  
> `mred/private/wx/win32/list-box`,
> `mred/private/wx/gtk/list-box`,
> 
> to support this functionality? (And if so how long would it take)

My guess is that it will be challenging to get click-to-edit behavior
to work on all three platforms (Unix/X, Windows, and OS X). Dragging
elements to reorder might be easier, but my guess is that it still
won't be easy.

The `mrlib/hierlist` library may be an easier starting point, since
it's built on top of the editor infrastructure. That should make
click-to-edit easy, and implementing dragging would be manual but
cross-platform. The `mrlib/hierlist` library has its own drawbacks,
however, such as a lack of support for columns.

If you only care about one or two platforms, it may be easiest to use
the raw Gtk or Windows API. You can add raw widgets with a GUI
otherwise implemented with `racket/gui` through methods like
`get-handle` and `get-client-handle`.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to