WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: kdmoyers on November 12, 2019, 03:52:21 PM

Title: ReportView controls are awesome
Post by: kdmoyers on November 12, 2019, 03:52:21 PM
As I finish my fourth major project using a dialog
ReportView control, I have a few observations:

1. ReportView controls are awesome.  They make
my typical SQL-report-to-humans interface stupid
simple to implement.

2. I wish foreground and background colors of
individual rows and cells were controllable.

I mean, it would really be great to draw the users
attention important rows (this order is past due)
or cells (this price is too low).

3. Regardless, ReportView controls are awesome.
I will continue to use them happily.

$0.02
-Kirby

Title: Re: ReportView controls are awesome
Post by: JTaylor on November 12, 2019, 07:29:21 PM
I have tried to implement colors in my Extender for ReportView Controls but so far a no-go.   Appears it must be a CustomDraw thing and I also think it has to respond to Notifications, which I can't see how to do in an Extender.   I have made it possible to set images in the cells so that might accomplish some of what you want.  My demo puts little colored buttons at the beginning of the text in a cell.

Jim
Title: Re: ReportView controls are awesome
Post by: kdmoyers on November 13, 2019, 05:17:08 AM
<< I have made it possible to set images in the cells >>
Yes! I use it! fiddly to get imagemap set up, but it works great.
Title: Re: ReportView controls are awesome
Post by: JTaylor on November 13, 2019, 08:22:56 AM
Does the hassle with the ImageMap appear to be something that can be solved by me making some changes or just a hassle getting the image created as needed?

Jim
Title: Re: ReportView controls are awesome
Post by: kdmoyers on November 13, 2019, 09:16:24 AM
It's just that making the image map is a sorta non-typical thing to do: it's an array of images together in ONE image, stacked next to another with pixel perfect alignment.  Must be saved as a windows (not os/2) BMP with 24bpp color.  Just a bit fiddly.

Anyway, the color thing is not a big big deal.  Mostly, I just wanted to say what a great thing the reportview is.

-k
Title: Re: ReportView controls are awesome
Post by: JTaylor on November 13, 2019, 05:29:56 PM
Okay.  Just wanted to make sure there wasn't something I could do to make it better.

I agree.  That control was a wonderful addition.

Also wish I could get the coloring to work.  I have spent many hours on it but to no avail.    If Tony has any suggestions or, even better, some code, I am open to working on it some more :-)

Jim
Title: Re: ReportView controls are awesome
Post by: td on November 18, 2019, 08:55:12 AM
The only method I am aware of involves subclassing the control and taking part of the control's drawing process away from the OS and performing it in your own code.  It is something that is on the dialog function's enhancement list.
Title: Re: ReportView controls are awesome
Post by: JTaylor on November 18, 2019, 09:44:52 AM
Okay.   Will leave it alone then if you are working on it.   I have spent quite a few hours and gotten nowhere.   Hopefully you will add the other things I have in my extender as well.   I know they are easy to add because I did it  ;)

Jim
Title: Re: ReportView controls are awesome
Post by: td on November 18, 2019, 02:33:35 PM
Not of any real importance but in the interest of complete acruacy there are two other methods to accomplish the above.  One is to implement a custom draw handler and the other is to superclass the control. However, the control does not have an owerndrawn style.
Title: Re: ReportView controls are awesome
Post by: JTaylor on November 18, 2019, 09:03:45 PM
Yeah...I have been trying the Custom Draw option.

Jim
Title: Re: ReportView controls are awesome
Post by: td on November 19, 2019, 08:31:02 AM
Custom Draw implementations can be tricky to implement but often require less work than subclassing.  The Dialog function uses subclassing for most of its controls because subclassing allows for more fexibility.