As I have not seen any answer to that query, I am risking some speculations.
In a legend window, each individual legend forms a frame; I believe that
this a reliable object to work with. You can get all the information you
want about a frame with LegendFrameInfo() (appeared in version 5). You will
need FRAME_INFO_POS_X ,..._Y, _INFO_WIDTH and _HEIGHT.
I would create the layout frame to a width/height identical to the frame
then reset the position of the legend frame within the Legend window.
This resetting needs some explanation (I have no official info for that,
just pointers from experiences) because it concerns the referencing space of
the legend window. MI uses the term "canvas"; its upper left corner seems to
be 9.9167, 90.0 in. It seems to be the minimum of X and the maximum of Y. MI
places automatically the frame to the top left of the canvas thus defined,
but it adds a white margin around the frame.
To crop away any margin (I do not think that the size of the frame itself
can be changed) I would suggest that the repositionning of the legend frame
in the legend window should be at that 9.9.167,90.0 position.
If a legend contains several frames, the same principles should apply with
variations in relative alignment of the various frames.
Now, all that is pure abstraction, but the little tests I conducted indicate
that it is a potential way to build a solution.
Jacques Paris
e-mail [EMAIL PROTECTED]
MapInfo/MapBasic support http://www.paris-pc-gis.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Amy
Sabalesky (E-mail)
Sent: September 25, 2001 11:44
To: [EMAIL PROTECTED]
Subject: MI-L Creating Layouts in MapBasic - How to autosize legend
frames
boundary="----=_NextPart_001_000A_01C145AE.EF315BE0"
------=_NextPart_001_000A_01C145AE.EF315BE0
I just spoke with Cindy at MapInfo Tech Support, and she suggested I put
this question to other MapInfo/MapBasic users to see if anyone else has
encountered my problem and possibly answered it.
I write programs in MapBasic that automate map and layout creation. My
problem is that my boss wants the legend window in every layout �auto-sized�
so as to ensure that there isn�t too much white space or that some of the
title or range text isn�t cut off. Cindy and I were unable to figure out
any way to do that with MapBasic commands. Help? Has anyone else developed
a workaround for this?
If you have some ideas or solutions, please respond to me personally at
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> . Thank you.
Amy Sabalesky
Conclusive Strategies, 713-436-3838
Market Analysis, Direct Marketing Research & Software Development
Visit us at www.conclusivestrategies.com
------=_NextPart_001_000A_01C145AE.EF315BE0
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.