[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Gfx User Interaction



PureBytes Links

Trading Reference Links

yes maybe. But if one could get the curson X&Y coordinates in pixel format it would be easy to create button on top of the chart as well. I think this is not available in Amibroker currently or one should translate the available curson location format to pixel format but then one needs to get additional info about the screen size etc.  So I guess no button on the charts for now. 
 
rgds, Ed 
 
 
----- Original Message -----
From: scourt2000
Sent: Thursday, June 14, 2007 2:57 PM
Subject: [amibroker] Re: Gfx User Interaction



It sounds a lot easier if an enhancement were made to Amibroker to
allow a Windows button to be placed directly onto a chart and then
an AFL function tied to it so that when you press the button the
function gets called.

--- In amibroker@xxxxxxxxxps.com, "Edward Pottasch" <empottasch@...>
wrote:
>
> hi,
>
> I am making some test code to get a button into my RT chart
window that when pressed can do something. The code draws a
rectangle on top of the normal Plot. I want to click the left mouse
button in order to execute for instance a sell order.
>
> GetCursorMouseButtons() I understand. But I also need to define
that the X and Y mouse position need to be within the rectangle.
>
> GetCursonXPosition() and GetCursorYPosition give the position in
datetime and $-value format. I want to get it in pixel format. Is
this possible? Or is there another way to do it?
>
> rgds, Ed
>
>
> // set overlay mode: mode = 0 (default) - overlay low-level
graphic on top of charts,
> // mode = 1 - overlay charts on top of low-level graphic,
> // mode =2 - draw only low-level graphic (no regular
charts/grid/titles/etc))
> GfxSetOverlayMode( 0 );
>
> // get screen height + width
> sh = Status ( "pxheight" );
> sw = Status ( "pxwidth" );
>
> // draw rectangle
> GfxRectangle( sw / 20, sh / 20, 3 * (sw / 20), 2 * (sh / 20) );
>
> if( GetCursorMouseButtons() & 1 AND xcursorPos> x1 and xcursorPos
< x2 and ycursorPos < x1 and ycursorPos > y2 )
> {
>
> printf("left mouse button is pressed down" );
>
> }
>
>
>
> ----- Original Message -----
> From: Tomasz Janeczko
> To: amibroker@xxxxxxxxxps.com
> Sent: Saturday, June 02, 2007 12:20 PM
> Subject: Re: [amibroker] Gfx User Interaction
>
>
> You can execute on-click actions because then the formula is
actually executed.
> But it is NOT executed on mouse move (hovering over chart).
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "conrad_faber" <cfaber@xxx>
> To: <amibroker@xxxxxxxxxps.com>
> Sent: Saturday, June 02, 2007 12:01 PM
> Subject: [amibroker] Gfx User Interaction
>
> > Hi
> >
> > Does anyone know whether the user can interact with Gfx?
> > I am referring to something like:
> >
> > If (Cursorposition within Rectangle)
> > {
> > Highlight Rectangle;
> > On Mouseclick do Bla-bla;
> > }
> >
> >
> > Thanks
> > Conrad
> >
> >
> >
> > Please note that this group is for discussion between users
only.
> >
> > To get support from AmiBroker please send an e-mail directly
to
> > SUPPORT {at} amibroker.com
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check
DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___