Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Markup User Interface Ideas
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup User Interface Ideas

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Markup User Interface Ideas
    Posted: 16 August 2009 at 1:36pm
I've been experimenting with some ideas for user interface "widgets" for ReportControl cells using Markup. So far, I have created the following widgets:
  • Attributes widget (allows you to check/uncheck multiple icons that behave as attributes for a record
  • Switch widget (acts as a multiposition switch, that when clicked will cycle through different values/images).
  • Progress widget (does a reasonable approximation of an Office2007 progress bar)
    You can now set the progress bar base colour, and the gradient colours will be calculated dynamically. This ability is thanks to work done by ijwelch!
    You can now add markers to the progress widget.
  • UPDATED Sparkline widget. A great charting widget created by ijwelch. Thanks again Ian!
    There are now 3 distinct styles for the Sparkline widget.
  • NEW BulletGraph width. Another amazing widget by Ian (ijwelch) .


LATEST SOURCE AND SCREENSHOT IN MOST RECENT POST - I CAN'T ADD NEW FILES/IMAGES TO THIS POST ANYMORE?

WEIRD LINK WAS HERE???

I welcome any bug reports, questions, and comments. If you have any ideas for new widgets, I would like to hear about them. Enjoy!

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2009 at 1:23am
Really nice jpbro. :)
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3
Language: Visual Basic 6 SP6
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2009 at 12:49pm
Thanks joeliner, I hope you can find some use for the code!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 1:10pm
Updated with new Progress widget. I tried to do a reasonable approximation of the CJ progress bar in Office2007 mode.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 1:17pm
Good
 
I don't find option in code to add number on the top of progress bar.
E.g. how to show 45%?
Numbers give more precise details so better to have both methods
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 1:26pm
Thanks Mark.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:03pm
I just made some minor improvements to the Progress widget:

1) You can show the progress % on the bar (with properties to set text color, shadow color and shadow width)
2) You can show the progress % as a tool tip
3) Improved handling of rounded edges for selected rows (with or without window focus)

The first post in this thread has the latest update source and EXE demo.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:28pm
I've got an idea that would be nice to implement for the Progress widget, but I was hoping somebody with graphics/colour blending experience could help me out.

It would be cool if we could pass a colour (#xxxxxx or Long) and the widget would base its gradient values on that colour. This would make it easy to change the colour of the progress bar (for example, if there was an error in processing, you could change the colour to red and the gradients would be updated accordingly).

The standard "green" progress bar uses the folowing 5 gradients, with each colour being a gradient stop from left to right:

Top 1px Gradient        #d9e5c7    #d7e4c4    #ffffff
Next 1px Gradient        #b1ca89    #acc781    #edfdd0
Top Upper-quarter gradient    #9fbe6f    #ace05f    #e5fcbc
Bottom upper-quarter gradient    #8eb355    #a0dd43    #e5fcbc
Bottom half gradient        #69922b    #88c726    #cce49f

The average colour for the entire "green" portion of the progress bar is #99c753. What would be great is if a user could pass the average colour, and the rest of the gradient stops (as listed above) would be computed automatically.

So, is there anybody out there who has some ideas on how this could be accomplished?


Here's a blowup of the progress gradient if it helps:



Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:36pm
You can check the code in Common\XTPDrawHelpers.cpp with set of function CXTPDrawHelpers::GradientFill...
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:39pm
Thanks Mark, unfortunately I am only an ActiveX subscriber (no source)
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:42pm
Mark, I just saw the edit to your earlier post (mentioning # over bar). Did you see the latest source? You should now have a property of the CUiProgress class called ShowPercentage (can be showpercentagetype_OnBar for display on progress bar, showpercentagetype_ToolTip for display as a tooltip on mouse hover, or showpercentagetype_None for no progress percent display).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:51pm
No - I don't find it - may be my download was older?
 
Sure it was - new had extra 3 KB and I see % on just run - without modifications. I like it!
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 August 2009 at 6:53pm
I just checked the latest source in the top post of this thread, and it appears to have the new properties...maybe you need to download it again. I'll always keep the latest source in the first post in the future as well.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2009 at 2:55am
Hi Jason,
 
As always  Markup man strikes again
 
Thanks a lot
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2009 at 6:36am
Hey Aaron, it's good to see you back (for a while I hope )! I'm glad you liked the demo.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 3:04am
Originally posted by jpbro jpbro wrote:


I've got an idea that would be nice to implement for the Progress
widget, but I was hoping somebody with graphics/colour blending
experience could help me out.

It would be cool if we could pass a colour (#xxxxxx or Long) and the
widget would base its gradient values on that colour. This would make
it easy to change the colour of the progress bar (for example, if there
was an error in processing, you could change the colour to red and the
gradients would be updated accordingly).

The standard "green" progress bar uses the folowing 5 gradients, with each colour being a gradient stop from left to right:

Top 1px Gradient        #d9e5c7    #d7e4c4    #ffffff
Next 1px Gradient        #b1ca89    #acc781    #edfdd0
Top Upper-quarter gradient    #9fbe6f    #ace05f    #e5fcbc
Bottom upper-quarter gradient    #8eb355    #a0dd43    #e5fcbc
Bottom half gradient        #69922b    #88c726    #cce49f

The average colour for the entire "green" portion of the progress bar
is #99c753. What would be great is if a user could pass the average
colour, and the rest of the gradient stops (as listed above) would be
computed automatically.

So, is there anybody out there who has some ideas on how this could be accomplished?


Here's a blowup of the progress gradient if it helps:







Things become clearer in HSL color space:

As HSL
======
Top 1px Gradient                      84,13,90      84,14,89         0,0,100
Next 1px Gradient                  83,32,79         83,35,78         81,18,99
Top Upper-quarter gradient              84,42,75         84,58,88         82,25,99
Bottom upper-quarter gradient         84,53,70         84,70,87         82,25,99
Bottom half gradient                  84,71,57         83,81,78         81,30,89
Avg                         84,58,78

Simplified HSL
==============
Top 1px Gradient                      84,13,90      84,14,89         0,0,100
Next 1px Gradient                  84,32,79         84,35,78         84,18,99
Top Upper-quarter gradient              84,42,75         84,58,88         84,25,99
Bottom upper-quarter gradient         84,53,70         84,70,87         84,25,99
Bottom half gradient                  84,71,57         84,81,78         84,30,89
Avg                         84,58,78



See
https://forum.codejock.com/forum_posts.asp?TID=15126&PID=52828#52828
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 10:04am
Thanks to the work done by ijwelch, I have updated the demo (see top post for newest source) to include the ability to set the progress bar colour. Thanks again!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 11:27am
Hi Jason,
 
Good work Jason and Ian
 
To Ian (and maybe Jason): I tried your demo project and selecting gray colors will end up with Red colored markup... Maybe small mistake but still I have to mention this 
 
To Jason (and maybe Mark as well or the one who is in charge of DockingPanes) When putting RC in a Pane (CJ DockingPane control) the attribute and switch widgets don't always react on (a short) single click, you have to hold mouse button a little longer...
 
 
Thanks a lot for demo
 
btw Jason: I would like to draw triangles or squares (are setpoints) in the progressbar like the image below, is this possible?
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 11:34am
Hey Aaron, I don't see the triangle example image...did you attach it?

Re: the gray colors - maybe I used the wrong source from Ian (he had a version that was corrected for grays...I'll double check)

Re: docking pane - I haven't used the docking pane yet, but my guess would be that perhaps the pane causes the RC to refresh/repaint more often for some reason? This could be slowing things down and causing the unresponsiveness...Just a guess though.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 11:34am
Okay, I see the picture now :)

I'll see what I can do!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 2:58pm
Originally posted by jpbro jpbro wrote:

Hey Aaron, I don't see the triangle example image...did you attach it?

Re: the gray colors - maybe I used the wrong source from Ian (he had a version that was corrected for grays...I'll double check)


 
Hi Jason,
 
The sample I used was from Ian's post in XAML subforum. If you select a gray(ed) color from ColorPicker it does paint red markup gradient. With your sample I tried RGB(128,128,128) , if I'm not mistaken this is gray, and it does draw gradient in gray. 
 
Thanks for looking into my problem, would be nice if this could be done. Now I use picturebox for this, with gradient drawing functions. Your design is more a "modern" look
 
Just another question: Could I use your class (you already developed) for charting and use that for just a small chart and show it in a reportitem? I'm thinking about a chart that is realtime with a history (like chart in MS Taskmanager) Widget?  Same for PieChart but only the piece that belongs to the reportitem would "stick out" for a bit. (yes, I will keep on dreaming... hehehe)
 
Thanks a lot in advance
 
 
  
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 07 September 2009 at 9:00pm
Re grayscale progress bar:



Here's new version of xamlBar function from CUiProgress class. Now handles grayscale colors.


Private Function xamlBar() As String
   Dim lo_BaseColor                               As CColor
   Dim la_GradientColors(14)                      As CColor
   Dim lo_Saturation As Long
    

   ' Special thanks to ijwelch from the Codejock forum for this code
   ' to dynamically calculate progress bar gradient stop colors
   ' based on a single base color
   Set lo_BaseColor = New CColor
   lo_BaseColor.OLEColor = m_BaseColor
   If lo_BaseColor.Luminance > 78 Then lo_BaseColor.Luminance = 78
   If lo_BaseColor.Luminance < 21 Then lo_BaseColor.Luminance = 21

    'handle greyscale values
    If lo_BaseColor.Saturation = 0 Then     'it's grayscale
        lo_Saturation = -100    'this will force saturation calculations below to result in 0
    Else
        If lo_BaseColor.Saturation > 78 Then lo_BaseColor.Saturation = 78
        If lo_BaseColor.Saturation < 45 Then lo_BaseColor.Saturation = 45
        lo_Saturation = lo_BaseColor.Saturation
    End If
   'init colors
   
    Set la_GradientColors(0) = New CColor
    la_GradientColors(0).FromHSL lo_BaseColor.Hue, lo_Saturation - 45, lo_BaseColor.Luminance + 12
    Set la_GradientColors(1) = New CColor
    la_GradientColors(1).FromHSL lo_BaseColor.Hue, lo_Saturation - 44, lo_BaseColor.Luminance + 11
    Set la_GradientColors(2) = New CColor
    la_GradientColors(2).FromHSL lo_BaseColor.Hue, 0, lo_BaseColor.Luminance + 22
    Set la_GradientColors(3) = New CColor
    la_GradientColors(3).FromHSL lo_BaseColor.Hue, lo_Saturation - 26, lo_BaseColor.Luminance + 1
    Set la_GradientColors(4) = New CColor
    la_GradientColors(4).FromHSL lo_BaseColor.Hue, lo_Saturation - 23, lo_BaseColor.Luminance + 1
    Set la_GradientColors(5) = New CColor
    la_GradientColors(5).FromHSL lo_BaseColor.Hue, lo_Saturation - 40, lo_BaseColor.Luminance + 21
    Set la_GradientColors(6) = New CColor
    la_GradientColors(6).FromHSL lo_BaseColor.Hue, lo_Saturation - 16, lo_BaseColor.Luminance - 3
    Set la_GradientColors(7) = New CColor
    la_GradientColors(7).FromHSL lo_BaseColor.Hue, lo_Saturation, lo_BaseColor.Luminance + 10
    Set la_GradientColors(8) = New CColor
    la_GradientColors(8).FromHSL lo_BaseColor.Hue, lo_Saturation - 33, lo_BaseColor.Luminance + 21
    Set la_GradientColors(9) = New CColor
    la_GradientColors(9).FromHSL lo_BaseColor.Hue, lo_Saturation - 5, lo_BaseColor.Luminance - 8
    Set la_GradientColors(10) = New CColor
    la_GradientColors(10).FromHSL lo_BaseColor.Hue, lo_Saturation + 12, lo_BaseColor.Luminance + 9
    Set la_GradientColors(11) = New CColor
    la_GradientColors(11).FromHSL lo_BaseColor.Hue, lo_Saturation - 33, lo_BaseColor.Luminance + 21
    Set la_GradientColors(12) = New CColor
    la_GradientColors(12).FromHSL lo_BaseColor.Hue, lo_Saturation + 13, lo_BaseColor.Luminance - 21
    Set la_GradientColors(13) = New CColor
    la_GradientColors(13).FromHSL lo_BaseColor.Hue, lo_Saturation + 23, lo_BaseColor.Luminance
    Set la_GradientColors(14) = New CColor
    la_GradientColors(14).FromHSL lo_BaseColor.Hue, lo_Saturation - 28, lo_BaseColor.Luminance + 11
    Set lo_BaseColor = Nothing
    
   xamlBar = "<StackPanel Orientation='Vertical' HorizontalAlignment='Left'>"
   xamlBar = xamlBar & xamlBarChunk(1, la_GradientColors(0).HTMLColor, la_GradientColors(1).HTMLColor, la_GradientColors(2).HTMLColor)
   xamlBar = xamlBar & xamlBarChunk(1, la_GradientColors(3).HTMLColor, la_GradientColors(4).HTMLColor, la_GradientColors(5).HTMLColor)
   xamlBar = xamlBar & xamlBarChunk(m_BarTopMiddleHeightsPx, la_GradientColors(6).HTMLColor, la_GradientColors(7).HTMLColor, la_GradientColors(8).HTMLColor)
   xamlBar = xamlBar & xamlBarChunk(m_BarTopMiddleHeightsPx, la_GradientColors(9).HTMLColor, la_GradientColors(10).HTMLColor, la_GradientColors(11).HTMLColor)
   xamlBar = xamlBar & xamlBarChunk(m_BarBottomHeightPx, la_GradientColors(12).HTMLColor, la_GradientColors(13).HTMLColor, la_GradientColors(14).HTMLColor)
   xamlBar = xamlBar & "</StackPanel>"
End Function


ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2009 at 10:52pm
Hey Ian - thanks a lot for that updated color code.

Aaron - I have modified the code to cache a number of strings in the CUiProgress class to see if that will speed things up (maybe you could try it out with the DockingPane again?). Not sure if it will make any difference, and I also may have caused some problems here (particularly if I forgot to mark the class dirty under circumstances that would require the strings to be re-created with new values).

I've also added support for triangular-ish markers. I've tried to give them a 3d-ish appearance, but I'm sure that they could be made to look nicer. Anyway,give it a try and get back to me if there are any problems (new source will be in top post momentarily).

Jason
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2009 at 11:02pm
For some reason, I can't edit my top post...so I'll post the latest source here:

uploads/20090908_230103_RcMarkupUI.zip

Screenshot:


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2009 at 11:07pm
Aaron - regarding the charts in ReportItems.

In theory it is possible (in that you can use any markup in the RC now AFAIK). The problem is that my chart demo uses the MarkupLabel objects instead of markup strings. AFAIK, the RC only supports markup via strings (in the caption property). It would be a fair amount of work to convert my demo to a strings version (so I will leave this to another enterprising soul). What would be nice is if each ReportItem could have its own MarkupUiElement object and we could add markup objects to it (as with the MarkupLabel). Then code would be re-usable in both components.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2009 at 3:35am
 
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 7:54am
Originally posted by jpbro jpbro wrote:

Aaron - regarding the charts in ReportItems.In theory it is possible (in that you can use any markup in the RC now AFAIK). The problem is that my chart demo uses the MarkupLabel objects instead of markup strings. AFAIK, the RC only supports markup via strings (in the caption property). It would be a fair amount of work to convert my demo to a strings version (so I will leave this to another enterprising soul). What would be nice is if each ReportItem could have its own MarkupUiElement object and we could add markup objects to it (as with the MarkupLabel). Then code would be re-usable in both components.


Jason, I just PM'd you with new class to create basic sparklines like this:
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 9:52am
Very cool Ian, thanks a lot! I will try and get your code added to the demo today!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 10:48am
To anyone from Codejock:

Any idea why when I try to edit my top post (by changing the File attachment), I get the following error message:

SELECT tblThread.Thread_ID, tblThread.Author_ID, tblThread.Message,
tblThread.Show_signature, tblThread.IP_addr, tblThread.Hide,
tblThread.File_uploads FROM tblThread WITH (ROWLOCK) WHERE
tblThread.Thread_ID=52049; 

Microsoft OLE DB Provider for SQL Server error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

/edit_post.asp, line 557


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 10:53am
Unfortunately, I can't edit the top post anymore, so I will be posting updates as they arrive in new posts.

This latest update includes Ian's (ijwelch) cool new Sparkline widget. Here's a screenshot of all the current features:



Here's the latest source:

uploads/20090910_105227_RcMarkupUI.zip

Enjoy!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 12:31pm
Aaron - did caching some of the Progress UI strings help with the DockingPane clicking problem? If not, can you post a sample with the DockingPane so I can see if I can figure out what the problem is? Thanks.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 10 September 2009 at 5:36pm
Okay, I've put together a new sample, with some bug fixes, efficiency improvements and a slightly different approach:

  1. I'm caching the markup strings as much as possible to be more efficient.
  2. I'm using the vbAccelerator String Builder class instead of string concatenation for more efficiency (unfortunately at the expense of some readability)
  3. I'm now storing a IReportMarkupUI class in each ITEM instead of a single class at the column level. This will lead to more memory usage, but should make it easier to use (especially when you get into progress bar markers and changing Sparkline values, etc...)
  4. The Progress widget now properly handles being in a resizable column.
  5. Added some more comments to hopefully make things clearer.
I've also attempted to animate the Sparkline widget using a timer. This works, but even with all of the efficiency improvements, interaction with other widgets (e.g. clicking the Switch widget) becomes fairly unresponsive while the timer is running. It often takes 2 clicks to get the value to change. I would be very interested in any ideas on how to improve the efficiency in this area so that the responsiveness stays high. Maybe we need the ability to control RC Redrawing at a finer level? Say a LockRedraw property and RedrawRecord and RedrawRecordItem methods?

I've just had a thought that perhaps I can turn off custom drawing at key moments and maybe that will speed things up...I'll give it a try.

In any case, here's the latest screenshot:



And here's the latest source:

uploads/20090910_173528_RcMarkupUI.zip
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2009 at 4:27pm
Holy smokes! Ian has gone above and beyond the call of duty and implemented some new styles for the Sparkline widget and added a BulletGraph widget. Check out this screenshot:



So if you are ever in Ian's neighbourhood, you had better stop by and buy him a beer!

Here's the latest source:

uploads/20090912_162610_RcMarkupUI.zip
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 8:24am
Hi Jason and Ian,
 
This is really great  I haven't visited forum for a couple of days and look... reusable classes just ready to use   
 
My problem with clicking switch / attribute widget isn't dockingpane related, I did test (only with 1 pane) and it works fine. If you are going to use sparkline widget and set timer to less than 100 it doesn't always fire event but this is understandable hehehe. So I have to search problem in other controls as well.
 
Trying to understand how it all works is beginning to get a problem because my Markup knowlegde is very low  I need to upgrade my knowlegde to keep up with you guys (I know I said this several times but now I have to...) just to understand what is going on in your classes.
 
 
To Jason or Ian:
  1. In sparkline class I get lots of errors <divided by zero errors> in pCalcPoints where some margin is calculated ???
  2. Sometimes when you start timer and will start changing values the markup "jumps" to other values. I don't know why it happens but I noticed it several times
  3. I would like to add a gradient background (for all charting widgets) and some lines as well (as with MS TaskManager CPU history) I added some markup and it shows OK. But if I want to show progressbar and chart next to each other it doesn't look that nice:   Would be nice if both heights be the same
 
Thanks a lot

 

   

 
    
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 8:38am
Hey Aaron,

In sparkline class I get lots of errors <divided by zero errors> in pCalcPoints where some margin is calculated ???

Is this with the current code, or with modified code where you have changed the Margins? I haven't seen any DivideByZero errors yet. If it's modified code, can you post it?

Sometimes when you start timer and will start changing values the markup "jumps" to other values. I don't know why it happens but I noticed it several times.

I haven't seen this either...do you mean that the whole sparkline changes every value? Or is it just jumping more than 1 shift to the left?

I would like to add a gradient background (for all charting widgets) and some lines as well (as with MS TaskManager CPU history) I added some markup and it shows OK. But if I want to show progressbar and chart next to each other it doesn't look that nice:

Do you mean a gradient & lines to cover the entire report background? or individual gradients and lines for each report item/cell?

I think it would be quite difficult to cover the entire report background because you would have to do a lot of calculations for when the form or columns are resized. Something that would make this easier is if the CJ RC had a BackgroundMarkup property that allowed you to set markup that would be drawn first, and then the rest of the report could be drawn over top of it.

Okay, I just saw your picture (it wasn't appearing earlier), and I see you are drawing the gradient/lines on a per cell basis. So the problem is just the height of the gradient/background compared to the height of the progress bar? This should be easy enough to correct by adjusting the HeightPx value passed to the Sparkline control. Can you post your gradient code modifications so I can try this?

Thanks,
Jason
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 11:28am
It would be nice is someone from Codejock could comment on the responsiveness issues (when clicking items) with the demo app. It seems that the more markup cells that we add, the worse things get (even without animation).

I've tried to optimize the code as much as possible through caching, marking classes as dirty (so updates only occur when changes have been made) and by using a high speed string builder class, but it still seems that markup cells only respond to mouse events every couple of clicks now (not to mention the mouse icon keeps reverting to the default arrow instead of staying as the Hand icon when clicking on markup ui elements). I can only guess that this is because we are adding more and more Markup UI elements to the ReportControl.

Some questions:

  1. Is BeforeDrawRow firing too often/unnecessarily? My code does attempt to catch some unnecessary firings (e.g. when Width/Height of ReportItem is 0 pixels, why does it fire then?). If it is firing unnecessarily, can this code be optimized in CJ source to only fire when absolutely necessary?
  2. Maybe we need the ability to be able to redraw a single ReportItem instead of having to call Redraw for the whole ReportControl? That way, if only one item has changed we aren't wasting resources redrawing the whole control. Or is there already a better option for redrawing after markup updates?
  3. Why are the MouseLeftButtonDown and MouseLeftButtonUp markup events becoming completely unresponsive at times? Even with a click sometimes the corresponding sub in the VB6 code aren't being fired. Is this because the markup context is being destroyed and rebuilt during Redraw or something? Does it make sense to somehow cache clicks so that when the markup context is recreated, the clicks get sent? A short delay is better than no effect at all in my opinion.
  4. Is it possible to add MarkupContext and MarkupUiElement classes to the ReportControl & ReportControlItems respectively so we can use the (presumably faster) class approach to markup programming (like the MarkupLabel) instead of the slow and painful string approach? This would also allow for completely reusable code between those two controls. In fact, while I'm dreaming, why not add MarkupContext/UiElement to all controls that support markup? It is a vastly superior method (again, in my opinion).
I must say that it is bothering me that Markup for the RC and MarkupLabel hasn't seemed to be getting any further enhancements in a long time. I think it is easily one of the best features of your products (if not the best), as it opens up so many new possibilities for our software. I think the work that Ian and I have done on the RC UI widgets demonstrates just how much potential there is in this area.

I would be interested in hearing what other CJ customers think of the Markup features, because maybe I am alone in this thought (which would explain why markup is being largely ignored lately, or it least why it is not being developed to its full potential).

Thanks in advance for any comments on these issues.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 12:13pm
Hi Jason,
 
I didn't modify anything of the sample you provided. I only changed version of OCX in .vbp file because I don't have 13.2
 
Issue:
Aaron: In sparkline class I get lots of errors <divided by zero errors> in pCalcPoints where some margin is calculated ???

Jason: Is this with the current code, or with modified code where you have changed the Margins? I haven't seen any DivideByZero errors yet. If it's modified code, can you post it?
Aaron: To reproduce just assign "0" to la_SparkPoints in for loop when creating widget 
 
 
Issue:
Aaron: Sometimes when you start timer and will start changing values the markup "jumps" to other values. I don't know why it happens but I noticed it several times.
Jason: I haven't seen this either...do you mean that the whole sparkline changes every value? Or is it just jumping more than 1 shift to the left?
Aaron: I looks like this is at startup when you assign value to la_SparkPoints and when starting timer it looks like y points are changed somehow
(I assigned "1" to all la_SparkPoints when creating widget
 
Before
 
 
After
 
 
Do you see height of area on left side? 
 
 
 
 
 
 
 
I added these lines of code for gradient background and hor. / vert. lines:
 
    Dim strLinesVertical As String
    Dim strLinesHorizontal As String
    Dim xamlBackground As String
   
    xamlBackground = "<Border Height='" & m_HeightPx + 20 & "' Width='" & m_WidthPx + 2 & "' BorderBrush='#6e97cc' BorderThickness='1'>" & _
                       "<Border.Background>" & _
                       "<LinearGradientBrush StartPoint='0, 0' EndPoint='0,1'>" & _
                       "<GradientStop Color='#b6cbd5' Offset='0'/>" & _
                       "<GradientStop Color='#e0e4ed' Offset='.66'/>" & _
                       "</LinearGradientBrush>" & _
                       "</Border.Background>" & _
                       "</Border>"
   
    For i = 0 To 100 Step 5
        strLinesVertical = strLinesVertical & "<Line Stroke='LightGreen' StrokeThickness='1' X1='" & (m_WidthPx / 100) * i & "' Y1='0' X2='" & (m_WidthPx / 100) * i & "' Y2='" & m_HeightPx & "' ></Line>"
    Next i
   
    For i = 0 To 100 Step 25
        strLinesHorizontal = strLinesHorizontal & "<Line Stroke='LightGreen' StrokeThickness='1' X1='0' Y1='" & (m_HeightPx / 100) * i & "' X2='" & (m_WidthPx) & "' Y2='" & (m_HeightPx / 100) * i & "' ></Line>"
    Next i
 
and I added this:
 
With so_Xaml
            .Append "<Canvas>"
            .AppendByVal xamlBackground
            .AppendByVal strLinesHorizontal
            .AppendByVal strLinesVertical
 
            ......
            ......
End With
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 4:36pm
Hi Aaron, the divide by zero problem can be fixed by replacing the offending line with this code:


      If sRange = 0 Or (dValues(i) - sMin) = 0 Then
         p_Points(i).y = m_HeightPx
      Else
         p_Points(i).y = m_HeightPx / sRange * (dValues(i) - sMin)
      End If


As for the "jumping" problem, I believe that this is by design. It appears that the Sparkline widget dynamically adjusts the display to accomodate the min/max value. So when everything is the same value, you get a flat centered line, but as soon as other values start being introduced to the array of values, the Sparkline will calculate the best fit for the maximum value, and in the case of suddenly appearing negative values, the zero line will even be bumped up to the middle of the chart. This ensures that all values are always optimally visible. It should be possible to add HardMin and HardMax properties though and skip the dynamic calculations. This could be useful where you know you values will always be within a range of numbers and you want to ensure that the chart scale always remains the same.

Lastly, if you play with the margins for your Border tag and adjust the Y1/Y2 properties for your lines, you should be able to get the background image to appear at the same height as the progress bar.  Don't use m_HeightPx + 20, because that would likely move the bottom of your grid outside the bottom of the RC row. I haven't had time to mess around with this too much, but I will try to get to it later.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 4:59pm
KILLED LONG CODE BLOCK - NEW UPDATE COMING SOON!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 5:39pm
KILLED LONG CODE BLOCK - NEW UPDATE COMING SOON!

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2009 at 11:01pm
Well I must be a little bit crazy, or else just a good (bad?) procrastinator (actually, this work is teaching me a lot, so it has been useful and not just fun). I've taken some time to improve the demo once again by adding a CGridBackground class (including Gradient, SolidColor and NoBackground styles). This class includes CGradient (for controlling gradients) and CGridAxes (for controlling gridlines) classes.  It could still use some improvement (border colour for the background comes to mind), but it is certainly usable right now.

Here's some sample output:




Note that you can control the gradient colours & stops and the grid line colours & visibility, the above is just a sample.

Here's the source and compiled demo app:

uploads/20090913_225955_RcMarkupUI.zip

Enjoy!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 1:13am
That chart background looks good. Nice one.

Anyone have any ideas for improvements or new widgets?
ExtremeSuitePro 12.1.1
WinXP SP3
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 11:35am
Hi Jason,
 
The StopColors aren't working for me. If comment these lines your sample works.
 
 
To Ian: The issues I mentioned (in previous replies) are still a problem, maybe you have an answer to these problems?
 
 
Thanks a lot
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 7:32pm
Hi Aaron, couple of things:

1) What's not working about them? Are you getting errors? They seem to be working here.
2) What lines did you comment out to get things working?
3) Were you using different colours than the ones in the demo, or a different number of stops? Just wondering if the problem lies there.

Regarding the problems you were having with the sparkline, the latest source should have fixed the divide by zero errors, are you still getting them?

Thanks...
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 10:36pm
I can only see second spakline cell properly draw - first spakline cell just show code
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2009 at 11:03pm
Hi Mark,

Are you sure that you have the latest code (my most recent post with a link- unfortunately I can no longer add new file attachments or images to the top post)? Same problem in the EXE? Did you make any modifications to the code?

I've just re-downloaded and all of the sparklines are being drawn in source and EXE.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2009 at 12:42am
Originally posted by jpbro jpbro wrote:

Hi Aaron, couple of things:

1) What's not working about them? Are you getting errors? They seem to be working here.
2) What lines did you comment out to get things working?
3) Were you using different colours than the ones in the demo, or a different number of stops? Just wondering if the problem lies there.

Regarding the problems you were having with the sparkline, the latest source should have fixed the divide by zero errors, are you still getting them?

Thanks...
 
Hi Jason
 

The first sparkline is only showing markup string in reportitem like Mark said.

If I comment .Stops.Add lines the markup shows correct (without the background of course)
                  With .Gradient
                     .Direction = gradientdir_TopToBottom
                     .Stops.Add 0, RGB(&HB6, &HCB, &HD5), &H60
                     .Stops.Add 66, RGB(&HE0, &HE4, &HED), &H60
                  End With
 
 
 
I'm not getting divide by zero errors anymore but I still see the "jumping" of the sparkline (sometimes)
 
Thanks for looking into it
 
  
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 9:39am
Strange...I'm now using the latest 13.2 beta (I think it's the latest) and I am noticing some strange problems.

The demo seems to work fine at startup, and if I resize the form, everything works as expected. If I then re-order columns or re-size columns or even just click the grid and then resize the form, then I get the raw markup strings. I'm reasonably certain this wasn't happening before, but I will have to do more checking to see if the problem is with the markup control or with my markup strings. I'll get back ASAP.

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 10:10am
Mark, could this problem be related to the recent fix to the X mouse icon (disabling markup)? Now with the demo, if I click any of the Attribute or Switch icons, the cell switches to raw markup text...I can't think of anything that I would have changed recently that would result in this, but I will keep digging.

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 10:28am
Okay, there definitely seems to be a problem with the ReportControl (13.2).

If you click a Markup item that has an event associated with it, you only get 1 click before markup gets disabled. If your markup string is static, then the markup will continue to be rendered, but it will be unresponsive. If your markup is dynamic, then you will end up with raw markup strings.

Put a ReportControl (ReportControl1) on a form with this code to demonstrate the problem:


Option Explicit

Private Sub Form_Load()
   With Me.ReportControl1
      .EnableMarkup = True
  
      .MarkupContext.SetHandler Me
     
      .SetCustomDraw xtpCustomBeforeDrawRow
  
      .Columns.Add 0, "Test", 100, False
      .Columns.Add 1, "Test", 100, False
      .AutoColumnSizing = True
     
      Dim i As Long
     
      For i = 1 To 3
         With .Records.Add
            With .AddItem("1")
               .Caption = "<Border Cursor='Hand' MouseLeftButtonDown='LeftMouseDown' Background='Blue'><TextBlock Text='Static'/></Border>"
            End With
        
            With .AddItem("2")
               .Caption = "<Border Cursor='Hand' MouseLeftButtonDown='LeftMouseDown' Background='Blue'><TextBlock Text='Dynamic " & Me.Width & "'/></Border>"
            End With
         End With
      Next i
     
      .Populate
   End With
End Sub
  
Private Sub Form_Resize()
   Me.ReportControl1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub

Private Sub ReportControl1_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)
   If Item.Index = 1 Then
      ' Dynamic column
      Item.Caption = "<Border Cursor='Hand' MouseLeftButtonDown='LeftMouseDown' Background='Blue'><TextBlock Text='" & Me.Width & "'/></Border>"
   End If
End Sub

Public Sub LeftMouseDown(Reserved1 As Object, Reserved2 As Object)
   ' Only fires once and then markup is disabled
   Debug.Print "MOUSE DOWN " & Rnd
End Sub


If you click a static column,  the markup will become unresponsive after the first click. If you then resize the form, the dynamic column will show raw markup strings.

This definitely was not a problem with an earlier beta.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 10:48am
I debug your case and catch this:
Cannot convert string in attribute 'Offset' to object of type 'CXTPMarkupDouble'. Line 1, position 227First-chance exception in VB6.EXE (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
This is about top Sparkline cell I guess
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 10:52am
Hi Mark, thanks for the catch...I will take a look at that problem once the disabled markup problem is fixed (or perhaps Ian can figure it out easier since it is his code).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 11:01am
Your problem is not related to enable - disable switch. I can play with animation and same time click on icons (on second or third rows)
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 11:02am
Okay, well its related to something, that was just a guess since I only see problem in the latest 13.2 that I have. Did you try the small test case code that I posted?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 11:13am
No - can't copy to VB6 (no CR/LF) - please attach project or at least form as rar
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 2:25pm
Weird clipboard or browser malfunction? Anyway, here's the project:

uploads/20090916_142432_RcMarkupDisable.zip
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 2:58pm

Your project works properly - don't see any problem

 
this is your modified project - easy to test - uploads/20090916_152055_RcMarkupDisable.rar
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 3:35pm
Doesn't work for me. I've download the OCX at the link provided, renamed, re-registered - used both your sample and mine, same problem as described.

There is still a possibility that the problem is with my OCX, but it is difficult to tell 100% what version I am running. The About screen show 13.2, but without a revision # or date on that screen, how do I know 100%? I wish you guys would put a build number or show the file date and time on the About window, it would save a lot of headaches when beta testing.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 3:41pm
The recent one have new flag - PaintManager.GrayIfDisable
 
If set False - even you disable control - it still use usual colors
 
btw - I proposed Kirk to use SVN revision in VersionInfo and About a long ago....
 
 
I think we use different Markup ocx version (my is more fresh)
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 3:45pm
So it looks like I am up-to-date, but I still have the problem. Here's the result after a single click:


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 3:55pm
see my prev post update
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 4:08pm
I don't understand what the problem is - is it that I have an older Markup OCX? I didn't realize that the RC and the Markup OCX were dependent on each other? Or do you have a more recent RC version with newer internal markup that hasn't been built yet?


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2009 at 4:17pm
My Markup ocx source had SVN revision Sept 15 - I build it yesterday
Report ocx - Sept 16, around 6 am
 
I rebuild Report again now to be sure we use same code - get https://forum.codejock.com/uploads/BetaOCX/ReportControlBeta13-2.rar
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 10:24am
Still broken for me. I tried going back to an older 13.2 (doesn't have .PaintManager.GrayIfDisable property) and the code works as expected. I then retry the latest OCX (Sep16 @ 4:21PM) from the link provided above, and I get raw markup. I've tried this on Vista and Win2K, same problem.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 10:34am
Can be another markup core code in versions - as I told you - was Markup SVN update from Sept 15. I recommend you to ask Mike to make a fresh build all beta ocx set
 
This is today's snapshot - as you can see - no raw markup...
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 12:50pm
Hi,
 
I downloaded beta OCX and registered it. Opened existing project Jason created and on startup all seems "normal"... Resizing form will resize columns and also (because I have AutoColumnSizing = True) also works as expected. 
 
But now the trouble starts:
  1. Once a different row is selected and resize 1 column manually all Markup is broken except the attribute and switch widget column.
  2. Once a different row is selected and resize form (same thing)
  3. (another thing I noticed) I can't (for some reason) resize column larger than ??? only clicking a columnsplitter will show line on different place then column (see image)
 
 
 
 
 
 
btw Jason, I created some Markup for showing markers in different directions. Let us solve this first and discuss other things later
 
Thanks
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 8:48pm
Retested using 9647 build.

There is something very strange happening:

1) Start VB6 fresh (no other open instances, start from scratch).
2) Open and start (F5) the RCMarkupUI project and click one of the attribute icons. Raw markup appears.
3) Close the demo form (but leave VB6 and the project open)
4) Restart (F5) the project and click one of the attribute icons. The icon will switch states as expected.
5) Try clicking another attribute icon on the same row. Nothing happens, markup events are now disabled for that cell.
6) Try clicking another attribute icon on a different row. The icon will switch states as expected, and then markup events will be disabled for that cell as well.

If you subsequently close VB6 down completely and restart, all of the steps above are 100% reproducible. I don't think that I have ever seen state held between subsequent starts of a project in the IDE before! Can you reproduce this?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:34pm
I debug it and found that effect related to enable - disable markup. I see trace of Enable Markup after X-icon disparead but I guess inside item markup context is not valid now as it related to obsolete markup context of control - and control created new one!
 

XTPMarkupReleaseContext(m_pRecords->m_pMarkupContext);

m_pRecords->m_pMarkupContext = XTPMarkupCreateContext(m_hWnd);

May be we can store this context and reuse it? I will try
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:44pm
Is there a lot of overhead to all of this destroying and re-creating markup contexts? I feel like the click responsiveness is getting slower, and I wonder if it is my imagination or not...

Also, should you only be destroying the markup context when the mouse is down on the header (before a column drag), and not when the mouse is down over the report area? Just thinking out loud...but the markup event responsiveness is worrying me.

Lastly, I also notice that there are as many as 6 BeforeDrawRow events fired for a single mouse down...why so many? Are they necessary? It seems like this could really be affecting performance when markup strings are involved.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:52pm
I think we should forget about EnableMarkup function - looks like it not designed to toggle.
Please ask Oleg to fix the problem on Markup component level as I proposed in very beginning.
All working well if we don't use this toggle
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:54pm
Okay, I will open a ticket for Oleg.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:57pm
Please get updated ocx from the same link NOW and confirm the speed and other functional features
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:58pm
Can you rebuild without the enable/disable markup code so that I can create a test case for Oleg?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 9:58pm
Sorry, I missed your post. Will test now.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 10:13pm
Just retested the RcMarkupUi sample, and it seems to be behaving like it used to now. I haven't seen any raw markup text, so that is good news.

The click responsiveness is still a little slow though (but better I think). It often takes 2 clicks to get a result, which is a shame...
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 10:22pm
Okay, I now understand why the BeforeDrawRow event was firing 6 times on a single mouse down - it fires for each visible row and column, and my sample had 2 columns and 3 rows.

Is there a way to optimize the BeforeDrawRow event to only fire for the single cell that was clicked? Or is this a bad idea? I could image that maybe it needs to fire for a whole row if the selection is changing...but it seems excessive to always fire for all visible cells in all circumstances.

I'll attach a very simple markup project that has poor responsiveness (often needs 2 clicks to get a response). This markup is about as basic as it gets, so really it seems like markup events are unusable in the real-world if this is the best performance we can get:

uploads/20090918_222207_RcMarkupClickSl.zip
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 11:22pm
Guys - you aways asking about this infinite notifications which definetely slow your app down. BeforeDrawRow do it's job and there is no BeforeDrawCell function and developer want to use fancy individual shape for each cell. Can you improve your respond function to return immedeately if no action need?
Still many calls but fast? Is markup scripting language? I think yes - so this is also reason for app to be slow
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2009 at 11:56pm
Well we would like to have our cake and eat it too ;)

Kidding aside, I'm only wondering if it everything is working as fast as it can. In my RcMarkupUI demo, I am caching strings, and short-circuiting BeforeDrawRow when no changes have been made to the underlying markup (as you suggest) in order to try and speed things up, but it is still slow to respond to click events. In the very simple demo I posted above, there is really very little going on markup-wise, and it is still slow to respond.

So, if this is indeed as fast as it gets, that's good to know, but it does mean that interactive markup is not really going to be useful in the real world. That's fine if that's the case, I am just wondering if this is the case, or if there are inefficiencies in the current design that can be improved. You mention that BeforeDrawRow is doing its job, but I'm arguing that it is over-doing its job - why should BeforeDrawRow fire for rows that haven't been affected by anything? If a user clicks the mouse down on Row 2, why should BeforeDrawRow fire for all of the other visible rows? Maybe there is a good reason, I don't know, that's why I am asking. If there is no good reason, then maybe this is an area for optimization?

Also, even though you say there is no BeforeDrawCell, BeforeDrawRow sure seems to behave more like BeforeDrawCell than BeforeDrawRow (note that it has Row and Item parameters, which essentially correspond to a cell when combined).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 12:17am
In any case, I'm not convinced that the problem is with BeforeDrawRow...Here's an updated sample that only tries to dynamically update the first cell when the user clicks it...every other cell is short-circuited at the top of BeforeDrawRow. The click response is still not very good (often only every other click responds).

Compare the RC (left) with the MarkupLabel (right) in the following demo. They are essentially using the same markup & events, but the responsiveness is dramatically different. Now I know the RC does a lot more than the MarkupLabel, so maybe this is the best the RC can handle, but I'd like to know for sure:

uploads/20090919_001630_RcMarkupClickSl.zip

It almost seems the the MarkupContext or handler is being destroyed and recreated each click for the RC, so there is a short period where the handler isn't available and the clicks don't register. The fact that the mouse cursor flashes to an arrow temporarily (instead of always remaining a hand icon) seems to support this theory. Compare this to the MarkupLabel hand icon that is always steady.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 4:43am
Hi Jason,
 
About problem with updating Switch icon:
It looks like combination of BeforeDrawRow event and MouseClicks...
I did some test to see what happens and found following...

Because BeforeDrawRow event fires on MouseDown and MouseUp clicks (I don't know why this is necessary but it does ?!?!) Your clicking on (for example Switch item) are updated in between. Meaning BeforeDrawRow event already updated Switch reportitem but "didn't know" that value of icon had to be changed (value didn't change yet?) Forcing RC redraw will update the switch reportitem. 

Add Me.ReportControl1.Redraw in mo_MarkupEvents_SwitchClicked event. Run project > Now you will see the icon gets updated (if you have a lot of items you will see that items get updated a little slower) but at least it's updated... If you comment the .Redraw the item gets updated if you force RC to fire BeforeDrawRow event > so just using arrow down to select next row will do this. See? Previous row gets updated.

I will do some more tests to get this working properly. I'm very happy with the classes you provided, it even got me to look into Markup and even added some Markup myself  If these problem are solved I will get your demo updated and maybe I added some more (it's not easy for me but I will try myself)
 
Thanks a lot (again)  
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 9:29am
Hi, Jason - this is extra info about markup on cell level:

void CXTPReportRecordItem::SetCaption(LPCTSTR lpszCaption) { ....................

XTPMarkupReleaseElement(m_pMarkupUIElement);

if (m_pRecord == NULL) return;

CXTPMarkupContext* pMarkupContext = m_pRecord->GetMarkupContext();

if (pMarkupContext)

m_pMarkupUIElement = XTPMarkupParseText(pMarkupContext, strCaption);

else if (m_pRecord->m_pRecords) //extra source of markup

{

pMarkupContext = m_pRecord->m_pRecords->GetMarkupContext();

if (pMarkupContext)

m_pMarkupUIElement = XTPMarkupParseText(pMarkupContext, strCaption);

}

 

void CXTPReportRecordItem::OnDrawCaption(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pMetrics) {

ASSERT(pDrawArgs->pItem == this);

CXTPReportPaintManager* pPaintManager = pDrawArgs->pControl->GetPaintManager();

BOOL bForceMarkUp(FALSE);

if (pPaintManager)

bForceMarkUp = pPaintManager->m_bForceDynamicMarkupForCell;

//THIS CONDITION - IsVirtualMode() [Rev 7687 Oct 2008] PREVENTS MARKUP in Non-Virtual mode

//if (pDrawArgs->pControl->IsVirtualMode() && pDrawArgs->pControl->GetMarkupContext())

//if (pDrawArgs->pControl->GetMarkupContext()

// && !m_pMarkupUIElement) - rev 9113

//if (pDrawArgs->pControl->IsVirtualMode()

// && pDrawArgs->pControl->GetMarkupContext() && !m_pMarkupUIElement) - rev 9114

// FIXED BACK! Only for virtual mode! Developer have to set Caption of Item to have markup

// FIXED AGAIN WITH SPECIAL Flag to use

if ((pDrawArgs->pControl->IsVirtualMode() || bForceMarkUp)

&& pDrawArgs->pControl->GetMarkupContext() && !m_pMarkupUIElement) {

CXTPMarkupUIElement* pMarkupUIElement = XTPMarkupParseText(pDrawArgs->pControl->GetMarkupContext(), pMetrics->strText);

if (pMarkupUIElement) { ...............................

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 9:34am
extra info about BeforeDrawRow:
 
[id(6), helpcontext(4209)] void BeforeDrawRow(IReportRow* Row, IReportRecordItem* Item, IReportRecordItemMetrics* Metrics);
 
EVENT_CUSTOM("BeforeDrawRow", FireBeforeDrawRow, VTS_DISPATCH VTS_DISPATCH VTS_DISPATCH)
 
void FireBeforeDrawRow(LPDISPATCH Row, LPDISPATCH Item, LPDISPATCH Metrics)
  {FireEvent(eventidBeforeDrawRow,EVENT_PARAM(VTS_DISPATCH VTS_DISPATCH  VTS_DISPATCH), Row, Item, Metrics);}
void CChildReportControl::GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics) {
 if (((CReportControlCtrlPaintManager*)GetPaintManager())->m_bCustomBeforeDrawRow)  { 
  m_pParent->FireBeforeDrawRow(pDrawArgs->pRow->GetIDispatch(FALSE),
   pDrawArgs->pItem? pDrawArgs->pItem->GetIDispatch(FALSE): NULL, pItemMetrics->GetIDispatch(FALSE));
 }
}
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 9:53am
Hey Aaron, thanks a lot for looking into this too. The Redraw method is a promising lead - I may have actually had it in a previous version, but I think I took it out because things seemed to be working without it (I guess I was wrong!). I haven't tried it yet, but I will, so thanks a lot for that information. I hope we can get the speed improved, because the RC will be an even more powerful tool with responsive Markup events, and I look forward to seeing your widget contributions!

It does seem like Redraw is a bit wasteful in this case (I assume that it redraws the entire ReportControl)...Mark, would a RedrawCell method be possible with the current architecture, or are we stuck with a complete control redraw only (or maybe behind the scenes the Redraw method is "smart" and only redraws what is necessary already?).

And Mark, thanks for the code snippets - I'm not sure what I'm look at yet ;) but I will look it over and see what I can understand.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 11:49am
Jason - just potential idea how to cover X-cursor case: we can make public function
 
BOOL CXTPReportHeader::Is_X_Cursor()
 
inside this function will get current cursor HCURSOR hc = GetCursor();
and compare it with loaded X-Cursor handle
 
Before making any markup action app can call this function to check
In such approach we will not toggle enable - disable - we just prevent some actions....
You can try to use this new function on VB level - I exposed this checker BOOL Is_X_Cursor to ocx (code not SVN yet - just testing)
 
I think it can be simple start for you to check such approach
 
This modified ocx with new bool function ReportControl.Is_X_Cursor - uploads/20090919_121425_ReportControl_X.rar
 
No - this is bad idea - markup elements change cursor irrelevant to any report-based OnMouseMove functions
Sorry.
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 1:42pm
Hi Mark, the new property is almost useful, although it does add a lot of complexity. Here's how it kind of works:

If the Is_X_Cursor property = TRUE, then I can set the markup cursor to None and the X cursor remains visible.

Problems:

1) By default, markup object cursor appears to be set the Default instead of None. This means that I have to explicitly set the Cursor='None' attribute for every single markup tag (otherwise the Default/Arrow icon overrides the X icon)!
2) I now will also have to track which tags need special icons (say the Hand icon) and switch the markup strings manually based on the Is_X_Cursor property.
3) There is no event to know when dragging a column has started and ended, so it is more complex than necessary to swap the Cursors currently. I could probably do all this in the Mouse* events, but it starts getting really ugly, really fast.

It seems to me that the simplest and cleanest solution would be for the Markup core to have an IgnoreMouse property, and then the ReportControl could set that internally when the X cursor changes. It could be useful in other situations to (like drag & drop).
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 1:43pm
Actually, I just tried enabling drag and drop in my sample, and when dragging columns the Markup cursors are completely ignored by the ReportControl. How is this being achieved, and can it be extended to the column drag cursor?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 1:52pm
Jason please be more precise - are you use ReportControl_X in this case or previous version?
 
Are you mean rows in this sentence "when dragging columns the Markup cursors are completely ignored"?
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 2:01pm
I'm using the latest version with Is_X_Cursor property available, but it is not relevant to the Drag & Drop case (if that's what you are asking):

See this sample:

uploads/20090919_135837_RcMarkupCursor.zip

It has Drag & Drop enabled, and if you start dragging a row, the markup cursor does not over ride the drag & drop cursor. However, if you try dragging a column header, the markup cursor does override the X cursor. So maybe there is a clue here? How does the D&D cursor remain steady while the X cursor doesn't? Can whatever method D&D is using to maintain its cursor be reproduced by the X cursor code?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 2:24pm
Because dragging row does not use OnMouseMove while dragging column use it
 
But I already tested case when inside OnMouseMove I checked Is_X_Cursor - it does not help....
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 3:26pm
Maybe my cold is getting in the way of my thinking, but I don't see how Is_X_Cursor can realistically help on the VB side of things...I would have to continually update markup strings for all visible cells and modify the Cursor property for every tag as far as I can tell, which is really a lot to ask (it certainly appears to be a logistical nightmare). Unless you have a better idea that I haven't thought of, I think the Is_X_Cursor/Mouse tracking hand-off would be best handled directly between the ReportControl and the Markup core. Thanks for trying it out though...
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 September 2009 at 3:33pm
This is why I already told you what this appoach is not good. Let's come back to Markup component fix plan
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2009 at 2:15pm
Originally posted by jpbro jpbro wrote:

Okay, I now understand why the BeforeDrawRow event was firing 6 times on a single mouse down - it fires for each visible row and column, and my sample had 2 columns and 3 rows.

 
Hi,
 
I did test again (with Jason's last Demo project, 4 columns and ... rows) and wanted to know how many times BeforeDrawRow event fires just for one visible row. (some cases needed 2 rows) It turns out for:
 
  1. MouseDown 15
  2. MouseUp 25
  3. MouseUp on Switch widget 45 times
  4. Select next row with arrow down key 90 (2 rows visible)
  5. Select previous row with arrow up 55 (2 rows visible)
  6. TAB key 30 times (2 rows visible)
  7. Page-Up 45 times (2 rows visible) (understandable! because RC needs to redraw rows)
  8. Page-Down 55 times (2 rows visible) (understandable! because RC needs to redraw rows)
 
Well it easy to calculate how many times this will fire when you have 20 rows visible .
 
To Mark: Why does MouseDown/Up (and some other keys) fire BeforeDrawRow event? Even when there was nothing changed?
 
 
I'm curious though how this will work with V12.1 where Metrics supports Markup. I remember I did a test once with extendable Tooltips and used Metrics.Text for Markup. Mark,  just to help, don't be offended by this.  
 
Thanks
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 01 October 2009 at 3:55am
Originally posted by jpbro jpbro wrote:

Hi Aaron, couple of things:

1) What's not working about them? Are you getting errors? They seem to be working here.
2) What lines did you comment out to get things working?
3) Were you using different colours than the ones in the demo, or a different number of stops? Just wondering if the problem lies there.

Regarding the problems you were having with the sparkline, the latest source should have fixed the divide by zero errors, are you still getting them?

Thanks...
 
Hi Jason,
 
Problem with Stops:
 
In GradientStop.cls you did format PositionPercent and in my case Dutch is set in Regional settings. So format .Append Format(Me.PositionPercent / 100, "0.00") in Markup string will endup with commas in Offset and doesn't like that at all. I changed:
 
      With so_Xaml
         .Append "<GradientStop Color='"
         .Append Me.Color.HTMLColor
         .Append "' Offset='"
         .Append IIf(Me.PositionPercent < 100, "0.", "1.")
         .Append IIf(Me.PositionPercent < 100, Me.PositionPercent, "0")
         .Append "'/>"
      End With
 
At least I don't have to add extra code for formatting numbers (for now )
 
Thanks
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2009 at 2:55pm
Originally posted by mdoubson mdoubson wrote:

Guys - you aways asking about this infinite notifications which definetely slow your app down. BeforeDrawRow do it's job and there is no BeforeDrawCell function and developer want to use fancy individual shape for each cell. Can you improve your respond function to return immedeately if no action need?
Still many calls but fast? Is markup scripting language? I think yes - so this is also reason for app to be slow
 
Hi Mark,
 
Mark: BeforeDrawRow do it's job
Aaron: BeforedrawRow event is overdoing it's job...  Some of the actions like a mouse click on a row? Maybe you need to look into this to diminish the number of events. Fire only when really needed...???
 
 
Mark: Guys - you aways asking about this infinite notifications which definetely slow your app down
Aaron: Look at some of my replies in this thread where I summized the number of fired events.  This is definitely slowing down our app. and this has been proven by DEMO of Jason, right?
 
  
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2009 at 10:12am
OK - please post a list of non-needed cases and let other members confirm it because they can have another models and need some notifications you consider as non-needed
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2009 at 6:45am
Originally posted by mdoubson mdoubson wrote:

OK - please post a list of non-needed cases and let other members confirm it because they can have another models and need some notifications you consider as non-needed
 
Hi Mark,
 
I really hope other members are willing to discuss this also. I created a new thread (https://forum.codejock.com/forum_posts.asp?TID=15387) because this post is about something else, right?
 
Thanks
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.250 seconds.