Previous Thread
Next Thread
Print Thread
XTREE: property sheet multi-level #37578 21 Sep 24 03:50 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
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 "@")

coldef = coldef + "2~30~Address~SE@~" ! Level 1 (one "@")

coldef = coldef + "32~30~City~SE@~" ! Level 1 (one "@")

...

Last edited by Jorge Tavares - UmZero; 21 Sep 24 03:51 PM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37579 21 Sep 24 07:11 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Hi Jorge -

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.

I think the conflict is resolved in ash-7.0.1762.10-w32c-upd.zip .
See the notes for details: ash70notes.txt

(Not that you should interrupt any weekend festivities to test it now!) laugh

Last edited by Jack McGregor; 22 Sep 24 12:04 AM. Reason: Code revised and reposted.
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37580 22 Sep 24 09:07 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
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.

Have a nice Sunday


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37581 22 Sep 24 10:25 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
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.

Thanks

Attached Files propsheet.png

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37582 23 Sep 24 01:32 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Hi Jorge -

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.

-Jack

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37583 23 Sep 24 08:51 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
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 24 08:52 AM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37587 23 Sep 24 11:48 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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~~" 

[Linked Image]

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) ...
[Linked Image]

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.

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37591 24 Sep 24 07:44 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Looks great! cool

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 grin
Just forget that and thank you for the try.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37593 24 Sep 24 02:58 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
So NOW you discover a way to update column header colors??!! crazy We could have saved the company with this feature.... shocked

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37594 24 Sep 24 03:17 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Maybe there's still time! Should I rush to get that update to you? cry

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37595 24 Sep 24 03:20 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
grin i think its too late for us... but I like the feature!

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37596 24 Sep 24 11:27 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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...

ash-7.0.1763.0-w32-upd.zip
ash-7.0.1763.0-w32c-upd.zip
ash70notes.txt

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37599 25 Sep 24 10:46 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Wow! this was a fancy update, in one shot we have colours for column headers and blinking fields crazy

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. cool
Hope you're doing fine and with nice plans for your new future.

Many thanks

Attached Files propsheet2.png

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37601 25 Sep 24 03:12 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Jack - its time to inject some color back into society! smile

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37603 25 Sep 24 04:34 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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! cry

(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. confused)

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.

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37604 25 Sep 24 05:00 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
Ha! You are 1000% correct! laugh

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37605 25 Sep 24 07:31 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
Less is more and gray it's still a colour grin
(wonderful remembering, the Renné's colours demo cool )

Please, tell me what I should do to put a colour ONLY in the two cells with the "red square", knowing this is a property sheet.


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37606 25 Sep 24 07:36 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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. cool

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37607 25 Sep 24 07:58 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
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!)


Attached Files image_2024_09_25T20_12_48_684Z.png
Last edited by Frank; 25 Sep 24 08:16 PM.
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37608 26 Sep 24 01:21 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
That's beautiful Frank!

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...

[Linked Image]

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?

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37610 26 Sep 24 09:32 AM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
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.

Great job, many thanks


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37611 27 Sep 24 08:40 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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).

ash-7.0.1763.1-w32-upd.zip
ash-7.0.1763.1-w32c-upd.zip
ash70notes.txt

Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37612 28 Sep 24 03:44 PM
Joined: Jun 2001
Posts: 3,406
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,406
What about saturdays grin
It looks just perfect, great job cool

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 laugh
Anyway, it's great, it's working, is wonderfull, many, many thanks

Have a nice weekend cool

Attached Files propsheet3.png

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: property sheet multi-level [Re: Jorge Tavares - UmZero] #37615 30 Sep 24 08:03 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
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! cool


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3