MapInfo Pro Developers User Group

 View Only
  • 1.  OBJ_INFO_TEXTARROW - Change line style of leader line?

    Posted 8 days ago
    I've created a button to insert a new text object into a map window and I'm trying to make the default line style to have an arrow with a specific color and width.

    This code properly inserts the object where I clicked and sets the Arrow default but I've been unable to find the proper Alter Object clause to change the line style of the Text Object leader line.

    tmpInsertObject = CreateText( winid, x, y, s_Comments, 0, 0, 0 )
    Alter Object tmpInsertObject Info OBJ_INFO_TEXTARROW,2

    Any guidance or examples would be appreciated.

    ------------------------------
    Jay Russell
    CENTERPOINT ENERGY RESOURCES
    Houston TX
    ------------------------------


  • 2.  RE: OBJ_INFO_TEXTARROW - Change line style of leader line?

    Posted 8 days ago
    After more testing I found that the CreateText statement will use whatever styles are set with the Set Style Command

    I added this line and it worked:

    Set Style Pen MakePen(3,59,0) 'Sets up the line style as arrow with width 3 and color Black


    ------------------------------
    Jay Russell
    CENTERPOINT ENERGY RESOURCES
    Houston TX
    ------------------------------