How to Zoom using AFL in a Floating Window?

Hi there,

This simple code works nicely in a normal window:

procedure ZoomToIndex( FirstDateTime, LastDateTime )
{
    LastDateTimestr = DateTimeToStr( LastDateTime );
    FirstDateTimestr = DateTimeToStr( FirstDateTime );

    AB 	= CreateObject( "Broker.Application" );
    AW 	= AB.ActiveWindow;
    AW.ZoomToRange( FirstDateTimestr, LastDateTimestr );
}

DT		    	= DateTime();
FirstDateTime 	= BeginValue( DT );
LastDateTime	= LastValue( DT ); 
Zoom		    = ParamTrigger( "Zoom", "ALL" );

if( Zoom )
    ZoomToIndex( FirstDateTime, LastDateTime );

But it doesn't work in a Floating Window. So how to code for zooming in a Floating Window?

Thanks and Regards,

Jorgen

2 Likes

@BJW, unfortunately this is expected and the cause is explained in this previous answer by @Tomasz.

HI,

Yes, I expected that to be the case. But is it any way to solve the Zooming in a Floating Window?

Regards,

Jorgen

@BJW, I suggest asking @Tomasz if he still plans - in a future version - to provide a way to use OLE (or an alternative method) also for floating windows (as he considered doing in the past thread I linked).

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.