Re: Comparing pictures
Eduardo Gutierrez de O <[email protected]> Mon, 19 Mar 2018 17:14:18 +0100
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
A variant can even contain a dictionary of variants :) Another option is to subclass your listbox and add those additional properties to the cells, rows, columns. Eduo > On 19 Mar 2018, at 15:37, Jean-Luc Arnaud <jean-luc-E/[email protected]> wrote: > > Thanks, Giulio. > > Yes, this is helpful! I know since some days that a Variant may content a dictionary! And a lot of another things. > > I should have thought to that... > > Grazie mille! > Jean-Luc Arnaud > > Le 19/03/2018 à 10:50, giulio-yFZTWCmGK/pWk0Htik3J/[email protected] <mailto:giulio-yFZTWCmGK/pWk0Htik3J/[email protected]> a écrit : >> Ji Jean-luc, >> >> but the celltags are of variant type, >> so you can store everything there… >> >> you could simply define a class, with the parameters you need, >> and set the celltag to an instance of that class. >> so you can store multiple different values in a single cell tag >> >> hope it helps, >> >> Giulio >> >> Giulio Mastrosanti >> BitBazar srl >> 06 39737052 / 06 39725787 >> >> On 19 mar 2018, 10:45 +0100, Jean-Luc Arnaud <jean-luc-E/[email protected]> <mailto:jean-luc-E/[email protected]>, wrote: >>> Thanks for replying, Don. >>> >>>> As you draw the icon, could you put an identifier in a cell tag or an >>>> array and check that instead of reading the icon directly? Just a >>>> thought. >>> Yes, it's currently the only way I can figure out. Unfortunately, all >>> tags (Cell or Row) of my listbox are used, so, it only remains the array... >>> >>> Or maybe an additional and hidden column? What do you think about that? >>> >>> Jean-Luc Arnaud >>> >>> Le 16/03/2018 à 22:59, donJ a écrit : >>>> On 03/16/2018 10:42 AM, Jean-Luc Arnaud wrote: >>>>> Hi all, >>>>> >>>>> I'm used to drawing icons in Listbox cells. >>>>> >>>>> I need to compare these icons with pictures, in order to determine >>>>> what action should fire when clicked. >>>>> >>>>> I know coordinates of each icon in the cell. >>>>> >>>>> 1) Is the RGBSurface and Pixel comparison a good way? >>>>> >>>>> 2) How to get an RGBSurface of a cell area in the CellClick event? I >>>>> can't figure out how to get a Graphics object of the area and then a >>>>> RGBSurface. >>>>> >>>>> All suggestion welcome, including MBS plugins use. >>>>> >>>>> TIA for your help. >>>>> >>>> Hi Jean-Luc, >>>> As I recall, RGBSurface is pretty slow. As you draw the icon, could >>>> you put an identifier in a cell tag or an array and check that instead >>>> of reading the icon directly? Just a thought. >>>> >>>> Don Jungk >>>> >>> >