Hi Dimitry

Any Layout has a table, you can find the name of this table:
First set your Layout Window as the front window and then run this code
dim LayoutTab as string
LayoytTab = WindowInfo()

When you have the LayoutTab name you can use any MapBasic command too
manipulate theis table - like Select, Update, Delete, Insert, Fetch etc.

This way you can then find your text using SQL:
Select * from LayoutTab Where Str$(obj) = "Text"
Select * from selection where ObjectInfo(obj, obj_info_textstring) =
"MyText"
If SelectionInfo(sel_:info_nrows) = 0 then
   Print "the text " & MyText  & " has been deleted"
end if

You can put it into a variable using

dim MyTextVar as object
Fetch first from Selection
MyTextVar = Selection.obj

You can change the string Using Alter Object
Alter Object MyTextVar Info OBJ_INFO_TEXTSTRING,  "NewString"

and put it back in the layout using

Update Selection set Obj = MyTextVar

Hope this is too some help

Peter Laulund
National Survey and Cadastre, Denamrk






"Dmitry Bogdanov" <[EMAIL PROTECTED]> - 03-06-99 10:02:11

Til:    "MapInfo-L List" <[EMAIL PROTECTED]>
cc:      (bcc: Peter Laulund/MI/KMS)
Vedr�rende:    MI How to identify object in Layout?



Hello,

I need the following thing - imagine that I create a layout with several
objects,
and allow the user to add/edit/delete the objects. Then, I would like to
know
what happened to my certain object. How can I mark it to identify in the
future?

If this matters, the object is text.

Layout tables do not have any attributive information, and all text styles
are
controllable in Text Object dialog, so I cannot mark the text with some
invisible
style attribute which will be 100% not changed.

Unfortunately, Layout, unlike Map, does not call any event handler when the
user changes something in it.

Does anyone have an experience with such unusual problem?

Thanks,

Dmitry


----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]


Reply via email to