Markup User Interface Ideas |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
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:
WEIRD LINK WAS HERE??? |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
joeliner
Senior Member Joined: 09 June 2006 Status: Offline Points: 273 |
Post Options
Thanks(0)
|
Really nice jpbro. :)
|
|
Product: Xtreme SuitePro (ActiveX) version 13.1
Platform: Windows XP SP 3 Language: Visual Basic 6 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Thanks Mark.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You can check the code in Common\XTPDrawHelpers.cpp with set of function CXTPDrawHelpers::GradientFill...
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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!
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
|
|
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.... |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
Jason, I just PM'd you with new class to create basic sparklines like this: |
|
ExtremeSuitePro 12.1.1
WinXP SP3 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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:
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Okay, I've put together a new sample, with some bug fixes, efficiency improvements and a slightly different approach:
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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:
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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:
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Aaron, the divide by zero problem can be fixed by replacing the offending line with this code:
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
ijwelch
Senior Member Joined: 20 June 2006 Status: Offline Points: 262 |
Post Options
Thanks(0)
|
That chart background looks good. Nice one.
Anyone have any ideas for improvements or new widgets? |
|
ExtremeSuitePro 12.1.1
WinXP SP3 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
I can only see second spakline cell properly draw - first spakline cell just show code
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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:
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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)
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
No - can't copy to VB6 (no CR/LF) - please attach project or at least form as rar
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Your project works properly - don't see any problem btw - are you use most recent ocx - https://forum.codejock.com/uploads/BetaOCX/ReportControlBeta13-2.rar
this is your modified project - easy to test - uploads/20090916_152055_RcMarkupDisable.rar
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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)
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
see my prev post update
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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...
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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:
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Please get updated ocx from the same link NOW and confirm the speed and other functional features
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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) { ............................... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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)); } } |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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.
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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"?
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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....
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
This is why I already told you what this appoach is not good. Let's come back to Markup component fix plan
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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:
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |