I am using the below code to navigate through pages. Is there any alternative or better way of getting the same result? The slider seems to be too big. I don't have more than 10 pages
// GFX Drawing Example
Page = GuiSlider( 1, 5, 20, 100, 25, 80 );
Page = GuiGetValue( 1 );
SymbolNum = Page * NumCharts;
@amisur, as per the Using on-chart GUI controls tutorial (a must read!):
Page = 1; // your page index
idSlider = 1;
if( GuiSlider( idSlider, 10, 30, 200, 30, notifyEditChange ) == guiNew )
// init values on control creation
GuiSetValue( idSlider, Page );
GuiSetRange( idSlider, 1, 10, 1, 1 );
for( n = 0; id = GuiGetEvent( n, 0 ); n++ ) // get the id of the event
code = GuiGetEvent( n, 1 );
switch( id )
// do something
Page = GuiGetValue( idSlider );
// ... handle other GUI controls
Title = "Page: " + Page;
As you can see, you need to set the slider range when you create it (please, apply the above sample code to a new chart or pane).
I don't know if it's a good idea to use a slider to change pages. I would probably use 10 small GUI buttons.
Why don’t you just use built in chart sheets
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.