General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion macro On_Click and nodelist index

  • jrob61

    macro On_Click and nodelist index

    Participants 0
    Replies 1
    Last Activity 9 years, 11 months ago

    trying to speed up the process of editing, Open, and save for large documents and have been experimenting using a Strucuted_View and .css 'display:none' approach by limiting what is shown in the activedocument window to the currently clicked item in the structured_view.

    (1) One hurdle to overcome – is there anyway to know whether or not the user clicked in the structured_view vs the activedocument window (we are tripping over On_Click events in the activedocument window unnecessarily running the macro script to populate the activedocument window again.
    (2) having some difficulty grasping how XMetal 5.5 (or 7) Essential knows which nodelist to position the cursor for its On_Click event?  We can duplicate it by looping thru all the nodes but this takes extra time.  curious if there is a nodelist index number that the macros have access to without looping?

    basically, if we know the exact nodelist index#, we can sets its 'ContainerStyle=”display:none;” which appears to work faster than the time it takes to refresh the entire document using ActiveDocument.RefreshCssStyle()



    Reply to: macro On_Click and nodelist index

    a) in .css set 'display:none' for all tags
    b) On_Document_Open_Complete set first child's .css to 'dipslay:block'
    c) use .xft's TheView_OnInitialize to load activedocument tags into comboBox
    5) use comboBox's OnChange to display desired tag contents and toggle between 'display:block' and 'display”none'


  • You must be logged in to reply to this topic.

Lost Your Password?