Hi Jack, According the documentation, excerpt below, in XTF2_PROPSHEET, each @ in coldef defines the level. I tried something like "1~10~colx~S@@~~" but it doesn't trigger level 2, it remains in level 1. Did I misunderstood or is there something to fix? Thanks
Quote
The XTF2_PROPSHEET option addresses this by effectively rotating the tree 90 degrees so that the columns (according to the coldef) are displayed as rows. The column titles become the row headers or labels.
Property sheet mode also supports multi-level. To configure this, specify the cformat code @ for each "column" (i.e. each item) that should appear at level 1. Columns (i.e. items) without this code will appear at level 0. To designate an item at level 2 or below, add additional @ codes (one per level). For example:
coldef = "1~1~Shipping Info~S~~" ! Level 0 (no "@")
Apparently this isn't a very popular feature -- either that or everyone else who has tried it has been too shy to complain -- but it appears to have been broken when support for the non-property-sheet @@cformat feature was added (5? 10? years ago?).
Actually, it wasn't exactly 'broken'. It was just that the second @ was enabling the @@ left/right arrow feature rather than level 2. @@@ would have enabled level 2, @@@@ level 3, etc. But clearly that's not right.
Hi Jack, Thank you very much for the fix, the moment is perfect, starting the day with a mug of coffee (the first) after the saturday's parties.
Allow me to break the rule for "one post, one topic", before I've recovered all my faculties (around the fourth coffee), to ask about how difficult would be to hide the "labels" column? It may sounds strange but I explain, this "propsheet" is to register different kind of shoe measures for the left and right foot and I thought about using two propsheets side by side, the xtree on the left displaying the two column (labels and values) and the xtree on the right only with the column for the values.
By now, I'm playing and I have alternatives to achieve this, including use a field form instead of xtree so, do not start a project for this because I can even not use it at the end.
Hi Jack, I tried with empty labels on the second xtree and looks fine. Two questions: 1. Any chance to expand the colour to the labels column ? 2.Don't we have an option to display the checkboxes with empty values, wihout needing to populate the answer array with zeros ?
As you can see, I gave up to use multilevel, it looked strange to have the level control in the values column instead of the labels column and while editing there was a lot of acitvity to hide/display the checkboxes grid lines. Anyway, after arranging the indentation of the labels, I'm pretty happy with the current result.
Looks pretty good. How much more it can be improved is an unanswered question.
But the color issue did lead me to a discovery, that yes in fact, it is possible to specify colors for the headers (row headers in this case, but also column headers in a traditional tree). The trick is that Theme support has to be first disabled. Then we have to add some additional Advanced Coldef Options. I'll look into that tomorrow.
Even then, I don't think it will be possible to have different colors for individual row headers. (That should be possible for column headers, but I don't see any way to specify more than one set of colors for the entire set of row headers.) So if that's what you were hoping for, I'm afraid you're out of luck.
And as for the empty checkboxes, I'll give it some thought. I can see how in a situation like this it would be nice to not have to fill in zeroes, but I'm not sure if that can be a simple option or not.
Hi Jack, My idea about the colour in header is to emphasize each section, by now it's the gray cells in the values column and that's ok, it's enough visible, just a matter of better design, in my concept.
Regarding the checkbox treating "empty" values like "zero", I'm asking because I think we have that already but didn't found so, forget if not, at least for my project it's not that important,
And yes, I'm really happy with the current result, it's working fine with all kinds of fields in the column, well responsive and well looking.
Many thanks
Last edited by Jorge Tavares - UmZero; 23 Sep 2408:52 AM.
For better (or not), 7.0.1763.0 now supports the ability to control the foreground and background colors of the true column headers (not to be confused with the pseudo headers that are actually just special data rows), and as with most other column attributes, if applied to the column 0 it becomes the default for all the columns, although you can override it at the column level.
The new Advanced Coldef Directives are:
Code
RGBbgColHeader=r,g,b
RGBfgColHeader=r,g,b
In addition, there are similar new options for the row headers, except that in this case, it's all or nothing (there's no way at the moment to change the row header colors one row at a time).
Code
RGBbgRowHeader=r,g,b
RGBfgRowHeader=r,g,b
Note that since the header attributes are normally controlled by the Windows theme, you have to set xtr.usethemes=0 to allow the the above options to work.
Here's an example of custom row headers in the xtra16 program:
Code
xt'coldef$ += "0~0~x~H~"
! define some colors to be used in cell color references
xt'coldef$ += "RGBbg=128,128,255,A~RGBbg=128,255,128,B~"
xt'coldef$ += "DefaultFont=Lucida Console~"
xt'coldef$ += "RGBbgRowHeader=200,200,250~RGBfgRowHeader=30,150,200~~"
That won't be much help in highlighting individual rows or grouping them, but at the column header level, there are more possibilities (for hideous color combinations) ...
As for the checkboxes, I'm not convinced it's a good idea to allow space to be used in place of "0" for an empty checkbox, as I suspect it will break someone's existing code. So you may just have to live with that.
I still have some testing to do, but will probably post the update tomorrow.
Regarding the checkbox, it was not my intent to consider "space" equals "zero" by default, that definitely would break existing code, including mine. I had in mind this was discussed in the past and some flag was added but, probably, I was dreaming Just forget that and thank you for the try.
Well, keep in mind, this goes against the current trend of stripping down the displays to minimize anything fancy. (Kind of like the trend, around here at least, to paint every house white or gray with black trim.)
But if you (Frank) need something to play with between naps while sitting in your rocking chair on the porch with your laptop, or you (Jorge) want to spice it up just a bit more, here's the update...
Wow! this was a fancy update, in one shot we have colours for column headers and blinking fields
After adding RGBbgColHeader=136,136,136 for two columns (red box) and XTR.USETHEMES=0, the result is in the image, all the columns were affected. In advance, I loved the result, with the unexpected buttons that positions the cursor in the corresponding field and creates a nice contrast between header and input columns. Also, for the xtree on the right, where I intended to hide the column header and resulted in a "white strip" (previous post) was looking like a bug, now it looks nice with the "buttons strip" where I added the index number, perfect!
Anyway, this said, just to clarify, did I misunderstood the new feature where I was expecting the colour to be applied only for the columns where the RGBbgColHeader is set ?
Frank, I'm glad this inocent post contributed to get a feature that you were expecting, like you said, sadly too late to save the company, but maybe the new "blinking fields" can open the eyes of the new owners about A-Shell cutting edge features. Hope you're doing fine and with nice plans for your new future.
Frank - I think you should be directing that comment at Jorge! Here we give him the ability to add more colors and what does he use it for? Gray!
(Reminds me of Rene's demo at the Newtown Conference of his Mexican restaurant order-taking screen -- we were all geared up for a beautiful palette of vibrant colores mexicanos and instead what did he give us? All the buttons were shades of beige. )
But if I must be serious - regarding the question about whether RGBbgColHeader should affect all the columns, the answer is no, unless applied to the 0 column. (The RGBbgRowHeader attribute, on the other hand, always affects all the row headers.) But in your example, it's impossible to tell whether your RGBbgColHeader is affecting one or all columns because each of your two trees has only one real column.
(I know this more than a bit confusing, since in the property sheet model, the coldef definitions get rotated so that they effectively become rows. But that translation is all done in the A-Shell code surrounding the actual control. The control itself has no concept of a regular grid vs. a property sheet -- they're both just regular grids as far as it knows. So from the control's perspective, rows are always horizontal and columns are vertical. So your gray bars are still column headers, and your labels along the left edge are still row headers.)
After thinking about it though, maybe it would have made sense (or be more consistent) to swap the RGBxgColHeader and RGBxgRowHeader parameters when in Property Sheet mode? Would that make more sense? If so, we get that taken care of right away since it obviously would have a significant compatibility effect on programs.
I wish I had an answer for your question, but at the moment, I can't see how to accomplish that. (The individual row headers do not seem to have independent attributes like the col headers do.) But I'll think about it over lunch and maybe I can figure out a way to make them blink.
Hey Jorge - i have built some multi-tiered grids (non property sheet) where i created my own row header and was able to color it the way i wanted using normal row attributes.
PS: See attached where I created a sub header in green to redefined the top row to accomodate the child row. (and Jack i did use color!)
And although I hate to keep pouring colored salt into the wound, especially when Jorge will probably use them for even more shades of gray, but after an afternoon of struggle with this, I think I have it figured out how to be able to set the individual row header colors (but only when in Property Sheet mode). For example...
Before releasing this though, I think we need to decide whether the label colors in the image above should be set via RGBxxRowHeader or RGBxxColHeader options when in Property Sheet mode. I'm not sure which is more confusing -- they're associated with the column definitions, so maybe RGBxxColHeader makes the most sense, but that would be a compatibility change from 1763.0. On the other hand, even though they're associated with the column definitions, and even though the rows and columns are swapped in Property Sheet mode, in the end, we're still talking about row headers, so maybe sticking with RGBxxRowHeader would be more intuitive?
Note that property sheets don't have traditional column headers -- we could add them, but that's another project, and I'm not sure it's really necessary. Also note that in regular (non-property sheet) mode, I can't think of any practical way to support individually colored row headers. Technically it's possible, as seen in the image above, but since the colors are associated with column definitions, the number of rows is limited to the number of column definitions (currently 200). If we were going to support it more generally, we'd have to add a new control column type to allow plugging in colors for any arbitrary row header.
I'm going to hold off on releasing this until we can reach a consensus on the best way to approach it.
P.S. Note that the purple bar in the right-hand column in the above image is not a column header but an individually colored cell (which is also the case for Jorge's gray pseudo-column headers. I mistakenly referred to them as if they were real column headers previously.) Is it confusing enough yet?
Well apologize for all the confusion and extra work to get here, believe it or not, I would be fine and ready to receive a "no, not possible to have this", anyway, it was a nice chat that brought Frank and, at the end we have a nice new feature. Great xtree Frank, but in this particular case Property sheet is the best approach. Regarding the less confusing name, in my opinion, exclusivly for PropSheet, RGBxxHeader is the one.
At the risk of making this look like a cynical political maneuver, dropping an announcement on a Friday afternoon when no one is paying attention, here's an update that supports the individually colored row headers in property sheet mode (using RGBxxRowHeader as you wisely suggested).
What about saturdays It looks just perfect, great job
As an aside, I don't know if you add "ironic" to the cynical political maneuver regarding my "wise suggestion" ignoring it and going ahead with what you considered the best option or, for real, didn't notice that my suggestion wasn't RGBxxRowHeader but RGBxxHeader Anyway, it's great, it's working, is wonderfull, many, many thanks
Sorry, if I was being ironic, it was unconsciously so. More like inattentive (or maybe in need of better glasses)! Perhaps RGBxxHeader would have made the most sense in the Property Sheet context, and maybe should even be recognized as equivalent to RGBxxRowHeader in this case. Although I can't think of any scenario where HdrLines=# makes sense for Property Sheets (and thus any reason why the existing meaning of RGBxxHeader might eventually conflict with the new RGBxxRowHeader capability), my track record at underestimating the ability of developers to come up with scenarios that I never imagined is pretty poor. So maybe it's best to stick with RGBxxRowHeader.
In any case, your new screen layout is very classy!