All,

I wonder if anyone has had the same problem as I am having.

I have got the frames on my layout to display the mapper window I want on the 
layout, but I am having a problem with the legend window I am trying to put 
into another frame on the same layout.

When my mapbasic app has finished running, the legend is not displayed in the 
frame on the layout. If I double click on the frame that is supposed to contain 
the legend to bring up the frame object properties menu, it says in the Window 
drop down box that the frame is displaying the correct window. If I use the 
dropdown menu and select the legend again, when I click ok it displays the 
legend in the frame. 

Is there anyway to make MapInfo/MapBasic display the legend in the frame 
properly first time?

Regards

James

________________________________________
From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED] 
Sent: 22 June 2005 13:21
To: James Stott
Subject: RE: MI-L Frames on a Layout

James,
 
You can treat each Layout as a table, so you can loop through the tables 
records, fetch the required one and then work on it.  After you've altered the 
object you then update the table with the new object.  Something like this:
 
code starts ----->
 
Dim sLayoutName As String
Dim iRowID As Integer
Dim oFrame As Object
Dim iMapWinID As Integer
Dim objAlias As Alias
Dim aRowID as Alias
 
'// get the map window ID 
 
'// open the workspace containing the layout window
Run Application "o:\work\2005\test22.wor"
 
'// get the table name of the last opened window  - must be done immediately 
after the workspace is opened 
sLayoutName = WindowInfo(0, WIN_INFO_TABLE) 
 
'// set up some variables
objAlias = sLayoutName + ".obj"
aRowID = sLayoutName + ".ROWID"
 
'// now loop round until end of table
Fetch First From sLayoutName  
 
Do While Not EOT(sLayoutName) 
 
     If ObjectInfo(objAlias, OBJ_INFO_TYPE) = OBJ_TYPE_FRAME Then ' yes we have 
a layout frame object
          oFrame = objAlias
          iRowID = aRowID
          Alter Object oFrame INFO OBJ_INFO_FRAMEWIN, iMapWinID
 
         Update sLayoutName 
              Set Obj = oFrame
              Where ROWID = iRowID
      End If 
 
      Fetch Next From sLayoutName
Loop
 
<---- code ends
I'm not sure how you differentiate between the two layout frame objects?  
 
Hope this help further
 
Greg. 
  
   
This Electronic Transmission is intended only for the attention of the 
addressee. It may contain privileged and confidential information. If you are 
not the person for whom it is intended, you must not copy, distribute or take 
any action in reliance on it. If you have received this electronic transmission 
in error please notify us immediately by telephone, delete the transmission and 
destroy any hard copies.  
Nicholas Pearson Associates has used all reasonable efforts to ensure that this 
message and any attachments are free from viruses.  
    
 
Nicholas Pearson Associates 
Environmental Planners - Landscape Architects - Ecologists 
30 Brock Street, Bath,BA1 2LN 
Tel: +44 (0) 1225 445548 Fax: +44 (0) 1225 312387  
www.npaconsult.co.uk 
                                                                                
          
 
 

Reply via email to