[futurebasic] Re: [FB] Help Tags

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2009 : Group Archive : Group : All Groups

From: Deep <Info@...>
Date: Wed, 13 May 2009 11:25:58 +0100
Assuming the image will possibly vary but you know where the "hot points"
are located as an (x,y) position, how about something like:

1) Create the window.

2) Using code, create static controls at position (x,y) for each item.

3) Add the help text for those controls.

4) Draw the image.

In theory, the image will display, but the hidden controls will display a
help tag when the mouse is over them.

If you make the controls active, then clicking on them can do something else
such as open a small window describing the object at that location? Or if
you track for "mouse over" events, you can update a part of the screen which
shows the info, changing as the mouse moves around.

Just some suggestions,

Hope it helps,

Deep




> From: Patrick GRIMONT <pgrimont@...>
> Reply-To: <futurebasic@...>
> Date: Wed, 13 May 2009 12:05:52 +0200
> To: <futurebasic@...>
> Subject: [FB] Help Tags
> 
> Can someone show me some direction to solve the following problem :
> - I have drawn a big picture (gene map) and want to display the name of
> a gene when I click on it. I know how to find the gene info from the
> mouse position. My problem is to display the info. As a starting
> exercise, I want to display the mouse position in the window, when clicked.
> - I thought that help tags could be nice. Adapting the "Help Tag Demo"
> from FB_5_1_5 examples (I built a screen-large window and deleted the
> push button) I added the following fn:
> 
> local fn mouseEvent
> dim pt as point
> GetMouse (pt)
> helpText.u.tagString = str$(pt.h) + "-" + str$(pt.v)
> helpRec.content[0] = helpText
> w = window(_wndRef)
> ignore = fn HMSetWindowHelpContent( w, helpRec )
> end fn
> 
> I do not know it it is a proper approach, but it works. My concern is
> that the help tag is not displaid close to the clicked point. Settings
> for  helpRec.tagSide are only available to display the help tag outside
> the window or inside in the center or on the edge of the window. Not
> near the clicked point. For a large window with a lot of drawn objects,
> it is unpleasant.
> 
> Any suggestion ?
> 
> Cheers
> 
> Patrick
> 
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...