ReportView controls are awesome

Started by kdmoyers, November 12, 2019, 03:52:21 PM

Previous topic - Next topic

kdmoyers

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

The mind is everything; What you think, you become.

JTaylor

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

kdmoyers

<< 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.
The mind is everything; What you think, you become.

JTaylor

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

kdmoyers

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
The mind is everything; What you think, you become.

JTaylor

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

td

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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

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

td

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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor

Yeah...I have been trying the Custom Draw option.

Jim

td

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.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade