User (Legacy) Posted December 18, 2001 Report Share Posted December 18, 2001 I am using ChartFX Client/Server (5.0.1.0?) and am attempting to synchronize two disparate components. The component (non-chartfx) can only scroll by the hour, so i need to enforce that the chartfx component scrolls by the hour. I have tried putting code in the userscroll that calculates the next closest hour and call Scroll, but that does nothing (it actually seems to generate a userscroll event with the original data values). I have also tried just using the scroll event on the other component and call Scroll on the chart. Neither option seems to work. I cannot get the chart to scroll. A final option was to disable the chart scrollbar, and just use SetScrollView to move it around, but when you setscrollview, the scrollbar shows up. A note to SoftwareFX documentors: the documentation talks about a CHART_ML macro in the scroll method, but that is the only mention of it anywhere in the documentation, code or online faq/kb. What is it and where is it? So, any ideas on how/why i cannot get the chart to scroll? Data description: chart with 144 points. All displayed. User can "zoom" which sets the display to 20 points onscreen. At this point, the user needs to be able to scroll... by the hour. in the UserScroll of the chart, i calculate the scrollbar position and attempt to send a scroll command, and then set nRes to 1 to tell the chart to ignore the user event. Optionally, i have sent the same code from the other component's scroll event. Here are a few methods i've tried with no luck: 'ChartFXTTA.Scroll CHART_ML(4, lScrollPos), 0 'ChartFXTTA.Scroll 4, lScrollPos 'ChartFXTTA.Scroll 4, IntegersToLong(0, CInt(lScrollPos)) ChartFXTTA.Scroll IntegersToLong(4, CInt(lScrollPos)), 0 any help would be greatly appreciated. thanx, dev Link to comment Share on other sites More sharing options...
Software FX Posted December 19, 2001 Report Share Posted December 19, 2001 1) CHART_ML is defined in CFXOCX.BAS which you must include if you are using VB. CHART_ML is equivalent to Window's MAKELONG macro. 2) The scroll method will only scroll if there is more datapoints, in other words, Scroll works exactly the same as the scrollbar itself. If you want to use SetScrollView and hide the scrollbar, you need to turn OFF a flag called CS_SCROLLBARS in the Style Property as follows: ChartFX1.Style = ChartFX1.Style and not CS_SCROLLBARS By doing so you hide the scrollbars but still have a scrollable chart which you can scroll by code using Scroll or SetScrollView. I suggest using scrollview as it gives you more control. -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.