What I'm working on.... need feedback

I’m like Garth. I’ve been using Alex Restrepo’s CustomCellListbox for many years and just the other day I was thinking I should take a stab at my own version because it’s not exceptionally easy to use.

My comments and wish list items:

  1. Setup should have an easy load/save but also a manual setup step.
  2. Popup menus should have two modes. The first is that the data is the same for all popup’s in the column. The second is that data be populated at runtime and up to the user for each row. Fire an event? (That make sense)?
  3. Cell text vertical alignment (top, middle, bottom)
  4. Numeric cells to have an optional calculator dropdown.
  5. Date cells to have an optional calendar dropdown.

This is something I would buy in a heartbeat, by the way, as long as I can get full source.

Looks great so far! Keep us informed of progress.

It uses a “sparse” dictionary… so I can’t return ALL the selected cells, and many may not “exist”…
What I am going to do (and the Listbox does something similar), is return the “rectangle” of cells selected, and the user can extract the data as required (attempting to access a cell not in the dictionary, return a default value)

[quote=164351:@Bob Keeney]I’m like Garth. I’ve been using Alex Restrepo’s CustomCellListbox for many years and just the other day I was thinking I should take a stab at my own version because it’s not exceptionally easy to use.

My comments and wish list items:

  1. Setup should have an easy load/save but also a manual setup step.
  2. Popup menus should have two modes. The first is that the data is the same for all popup’s in the column. The second is that data be populated at runtime and up to the user for each row. Fire an event? (That make sense)?
  3. Cell text vertical alignment (top, middle, bottom)
  4. Numeric cells to have an optional calculator dropdown.
  5. Date cells to have an optional calendar dropdown.

This is something I would buy in a heartbeat, by the way, as long as I can get full source.

Looks great so far! Keep us informed of progress.[/quote]

  1. Every cell can be set one by one (full control over all attribute), if a cell does not have an attribute defined, it attempts to inherit from the column its in, if a column attribute has not been set, it attempts to query a row attribute, before finally deciding on a overall “default”

example

me.cellalignment(-1,3)=alignLeft // sets the DEFAULT alignment for all cells in COLUMN #3 to be left
me.cellalignment(3,3)=alignCenter // Cell 3,3 now has its "own" so it won't use the column 3 default
  1. Following the example in #1, the same applies for the contents of Popup Menus

  2. Vertical Alignment is already in the code :slight_smile:

4/5) I’m still thinking about this… What I would LIKE is to have the ability to allow the user to attach their own data selection controls (not everyone may like the same or need the same).

Any ideas on implementations or process flow are greatly appreciated :slight_smile:

Based on some of our own work, the popup’s can be a royal pain to get working cross platform.

Edit:
And when I say popup’s I mean item 4 and 5 that have some sort of popup control like a calendar or calculator showing above the list in the proper spot.

A quandry …
I now have it to the point where the user can select a cell, a row, a column or a rectangular area (like in Excel), but then I got to thinking… what is the best way to indicate the user wishes to edit the cell?

  1. Selecting a single cell puts it into edit mode (either editing the text, or toggling a checkmark, or displaying a drop down?)
  2. Requiring a Double Click?

Since this really is NOT a listbox, some of the same work flow don’t seem appropriate.

Excel seems to put a cell into edit mode on the first key click… But then Excel doesn’t support things like checkboxes etc (does it?)

If a single click, then a checkbox would only react if you clicked in the area of the check (and not allow edit of text?)
Color picker if only clicking on the […]?
DropDown if only clicking the arrow?
ProgressBar can ONLY be controlled programmaticlly?

Right now the MouseDown event selects a Cell (and sets up for a drag selection)… Should the user be given access to this event?
If so, it would disable HeaderClick, LabelClick since they rely on MouseDown as the first event… Internally MouseDown would alway return TRUE (either the User intercepted it, or the control consumed it)…

What does anyone else think? I want to provide enough functionality, but not expose so many events as to allow the user to be able to confuse the control.

A similar control I saw mentioned on here somewhere exposes very few events (as in NONE of the Mouse events or Drag events)

A redraw = False/True property to help load large datasets.

Excel does have check boxes and buttons, but that is mostly when you decide to venture in to VBA and GUIs with it…

A star ranking indicator (1-5) cell?

Filtering rows via string value or Regex?
Ex: me.AddFilter(column as Integer, value as String)

Already done… Me.ActiveUpdate=False suspends all redraws, Me.ActiveUpdate reinstates them

[quote=164485:@Tiago Ribeiro]A star ranking indicator (1-5) cell?

Filtering rows via string value or Regex?
Ex: me.AddFilter(column as Integer, value as String)[/quote]
I like the 5-Star Idea :slight_smile:
What would a Filter do? Hide rows where the data didn’t meet the filter? Hmmmmmm… Perhaps version 2.0 … I don’t want to over-engineer version 1.0 (something I have a very bad habit of doing)

As far as Selection… I have decided that it will return a RealBasic.Rect that contains the cell coordinates of the current active selection and the user can then decide to extract cell by cell and manage each returned cell value/type as required.

Already done… Me.ActiveUpdate=False suspends all redraws, Me.ActiveUpdate reinstates them

[quote=164485:@Tiago Ribeiro]A star ranking indicator (1-5) cell?

Filtering rows via string value or Regex?
Ex: me.AddFilter(column as Integer, value as String)[/quote]
I like the 5-Star Idea :slight_smile:
What would a Filter do? Hide rows where the data didn’t meet the filter? Hmmmmmm… Perhaps version 2.0 … I don’t want to over-engineer version 1.0 (something I have a very bad habit of doing)

As far as Selection… I have decided that it will return a RealBasic.Rect that contains the cell coordinates of the current active selection and the user can then decide to extract cell by cell and manage each returned cell value/type as required.

An update for those interested…
It is coming along quite well, turns out to be much more work than I anticipated, but I think the results will be worthwhile.
Its a cross between a Listbox and an Excel/Numbers spreadsheet, with the ability to define 13 different cell type (as of now)

  • Default - takes on the celltype of the column or row
  • Normal - standard “text” (with word wrap)
  • Integer - will format display as Integer number, OR “normal” if the value is not numeric
  • Double - will format display as Double, or “Normal” (Decimal places, and use of thousand sep customizable by cell)
  • DropMenu - like a popup menu
  • CheckBox - self explanitory right? Checkbox can be on the left or right of the cell
  • ProgressBar -
  • Date - will format in user specified format, or “normal” if value is not a valid date
  • DateTime - same as Date but will Time component
  • Time - same as Date but only Time component
  • Color - allows a color picker
  • 5Star - displays as a 5 star rating (colors customizable)
  • Stepper - Up/Down arrows to inc/dec a numeric value (min, max and increment customizable)
  • Slider - displays a slider to alter a numeric value

everything is working, except the dropmenu and slider
For the Date and Time types, the user can “attach” their own Date/Time picker and override the need for keyboard entry, as long as they accept and return a string in SQLDATETIME format.
By Default the Month and Day names are United States Standards, but can be easily customized by supplying a comma delimited string with the values in the language of your choice.
For Color, the user can over-ride the use of the system color picker and supply their own custom one.

Cells can have solid, dashed or dotted borders, include DIAGOANAL lines (like Excel)

I am currently working up a webpage that will be the “user manual”, and once it is somewhat complete I will post a link, then when the control is complete (or nearly so), I will release a demo project (compiled), and garner feedback prior to releasing it as a product.

This project originally started as an enhancement to my Property Inspector, and has grown to be a lot more useful. :slight_smile:

I may have missed this feature while skimming the previous comments, but if you are still looking for ideas, I have 2:

  1. Support for single cells to span multiple columns. i.e., The first row contains only 1 column with a centered title, then subsequent rows contain 3 columns each. Essentially “Merge Cells” from Excel.

  2. Hierarchal rows.

Best of luck - you have bitten off a pretty large beast.

  1. Support for single cells to span multiple columns. i.e., The first row contains only 1 column with a centered title, then subsequent rows contain 3 columns each. Essentially “Merge Cells” from Excel.
  • This is something that I have been thinking about since I started this project, and have not yet determined how best to implement it, both from the user defining it, to the control maintaining it in a manner that can be displayed
  1. Hierarchal rows.
  • This will not be part of this project, as it is better suited for a listbox type control, where this control stretches into the “spreadsheet” realm. There are dozens of events, methods etc that this control won’t be exposing that a Listbox does (mouse and keyboard events are all handled internally for example). All the cell, row and column data are stored in a dictionary, where a listbox most likely stores things in a structure more closely related to an array. The point is, this control can display every cell possible (which is a HUGE number), while only consuming ONE dictionary entry (assuming of course that all cells display the same default values)

Awesome looking project Dave. I can see many uses for this in my ‘big’ work project. Can’t wait to see the finished goods.

Finally think I figured out a structure to handle merging cells in this control… Still needs some work, the borders aren’t quite right, and I haven’t started on the mouse navigation to deal with random sized cells, but at least I have a plan :slight_smile:

this will add new new functions (not that I’ve documented all the other yet)

  • MergeCells(row1,column1,row2,column2) // will create a super cell that will span that area
  • UnMergeCells(row,column) // you specifiy the upper left corner of a merged area, and it will be released

but talk about scope creep :slight_smile:

[quote=168893:@Dave S]MergeCells(row1,column1,row2,column2) // will create a super cell that will span that area
UnMergeCells(row,column) // you specifiy the upper left corner of a merged area, and it will be released
[/quote]

Wait a minute… that’s my territory! :wink:

  • karen

Not invading your territory (too much) :slight_smile:
Yours is a listbox, mine is more a spread sheet, or so I thought

Although my intent in designing this was to replace my property inspector, so I can use this in my iOS Mockup program

[quote=168902:@Dave S]Yours is a listbox, mine is more a spread sheet, or so I thought
[/quote]

Well with mine you can do just about anything with it that you can do with the Xojo listbox… so it can be a lot of things. One demo is as an appointment calendar. Originally I did the whole merging cell things so I could create reports like I did in Excel.

Anyway good luck with yours!

  • Karen

Please add copy, paste support. For the checkbox, a zero could be unchecked, and anything other than a zero makes it checked.

This spread sheet-like stuff looks very interesting. One question: does (or will) it support formulas? That’s very important for spread sheets.

No it will not… it is not designed to be a replacement for Numbers or Excel, it is more intended to be a “super” listbox… or perhaps more akin to the DataGrid in VB… it is up to the user to manipulate the data content, just like it is in a listbox