Previous Thread
Next Thread
Print Thread
XTREE: hide if no data #37327 28 Apr 24 11:25 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,

Here is a soft one, just to relax grin

Sometimes there are columns in the XTREE to display complementary data that exists only in a few rows but most of the times those columns are empty.
When those columns are positioned to the right, fine, I just leave them there but, even though, sometimes those columns trigger unnecessary horizontal scroll bars.
When these columns bother, I use an hide'col_X$="H" which is cleared while loading the array on the first non-empty value for the column.

Would it be reasonable to consider a cformat "He" to hide empty columns?
Where empty could be all rows "" for string columns and all rows 0 for numeric columns.

Thanks

Last edited by Jorge Tavares - UmZero; 28 Apr 24 11:38 AM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37328 29 Apr 24 04:13 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I like it. In fact I can think of a program I use a lot (the generic file viewer ADDSVUE) where this might be a very nice option, since a lot of files have a lot of unused fields which just clutter up the grid with unnecessary columns.

But it's early on Monday and I'm not yet stressed enough to need the relaxation, so I'll work on it later... laugh

Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37329 29 Apr 24 05: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
Excelent!
And maybe a glass of good Red will help...later


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37330 30 Apr 24 01:40 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I haven't had to resort to that (yet), but here's a first pass at it:

ash-7.0.1758.0-w32c-upd.zip
ash70notes.txt

As you'll see from the notes, I went with HH as it somehow seemed cleaner to me as I was looking at the code.

Note that unlike Advance Coldef Options, the cformat codes cannot be defaulted (at least not currently) using column 0, so you'd have to add the HH code to potentially every column.

Now maybe I'll go for that Red... cool

Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37331 30 Apr 24 05:28 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
Just wonderful, easy and with a very nice result.
After such an easy and elegant solution, you should go find a complex HH Madeira wine to enjoy the success or, if you prefer something local you can try HH-Estates

Thank you very much


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37332 30 Apr 24 04:21 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Thanks for the tip. But are you by any chance moonlighting as an HH marketing rep? cool

Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37333 30 Apr 24 04:32 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
No, no marketing rep, I just knew already the HH Madeira wine and found the HH-Estates while searching the link to put here as a joke by analogy to the new HH cformat option :-)


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XTREE: hide if no data [Re: Jorge Tavares - UmZero] #37334 30 Apr 24 08:52 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Oh well. I thought maybe I was in line for a kickback, or perhaps some kind of bidirectional pop-up ad promotion? (It's easy to imagine A-Shell developers starting at our HH topic in the AshRef and clicking on the HH Madeira pop-up ad; it might be a bit more challenging to lure wine shoppers over to XTREE. But they'll be glad they did!)


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3