From: Robert M. <rm...@po...> - 2006-10-15 20:18:35
|
Arthur Schwarz wrote: > */Robert May <rm...@po...>/* wrote: > Arthur Schwarz wrote: > > Would it be possible to expand the Grid implementation to include > > Cell tips and allow a multiselect option on List Boxes? > > From what I can see from the documentation and code, tips are already > supported for cells, where the information is too long to display in > the available space, using the EnableTitleTips() method. > > I was thinking more in terms of tooltips. The Title > Tips are not the same, as you have noted. OK. That wasn't what I was saying, I was mis-understanding what you were asking. I now think (although you have not said so) that you want to put your own tips up, containing something other than the cell's contents (e.g. some helpful information about what should be in the cell?), when the mouse hovers over a cell. It should be possible to use a standard tooltip for this, but due to the way that Win32::GUI::Grid has been implemented it does not use the standard Win32::GUI subclassing model, and so the right events do not get sent to the right places for this to work. I'm afraid that I don't have the bandwidth to look at how to fix this right now. > The GVIT_LIST style is actually a ComboBox, and Comboboxes don't > support multiple selection - besides, if you could have multiple > selection, how would you represent the multiple values in the cell > once the selection was made? > > If I understand your question correctly, allowing > multiple selections can cause the grid cell to be > populated with multiple values, each value separated > by some mark, e.g., '|'. The representation issue was really secondary to my original statement. Combo boxes do not allow multiple selections. > > To do this you'd need to create a new class, subclassing one of the > GridCtlCell* classes to implement what you wanted - not something that > I'm likely to look at, but feel free to raise an RFC. If you can > persuade someone else to add this functionality to the underlying grid > control, then I'd e happ to have a go at integrating with the perl side > of things. > > If I knew what an RFC was .... I did of course mean RFE (Request for enhancement) - you can find the page from the perl-win32-gui page at sourceforge under 'Feature Requests'. > On the other hand, and > if you don't mind, I'll try to look at the XS file > and give a hand at implementation. By all means. I think you'll be needing to look at the source of the underlying grid control (MFC Grid by Chris Maulder), as the XS is only a thin wrapper around that. > For my purposes > the (potential) editor is a 'toy' without this type > of capability. It requires that a 'casual' user have > too much knowledge before the editor can be used. My > own approach is to try to provide all needed inform- > ation when needed if known, rather that to require > that a user have a thorough understanding of Windows > or Perl. I suspect that just to move the project > along I will forgo this capability, and then > implement it at a later stage. There's always the possibility of a different representation: A double click on such a cell bring up a dialog that allows you to select the options - it'd give you much more room for manoever. If, as I suspect, you're looking for a way for users to select style, then I would question whether a dropdown is sufficiently easy, even if you can find a way to enable multi-select, as you'll (possibly) be want to cope with check all the illegal combinations of styles? Just my 2 cents. Rob. |