Loading...
 

RemoveFormatName

RemoveFormatName

RemoveFormatName(windowID, oboxID), RemoveFormatName(, oboxID), RemoveFormatName

Parameters: Identifier of a window and an object box

Stack
Stack Position Description
Stack(In) Top String
Stack(Out) Top -

Removes the specified format list name from the currently set format list (set with SetFormatName or AddFormatName).
This is only useful if AddFormatName has been used to define common formats for both format lists (the currently set one and the one passed as parameter by name).

The most common use case is to clear away a temporarily created format list. If object box entries still refer to this format list, they are displayed as if no formats were defined (for these entries).

Code example:
ObjectListView(Matchcode, CONTEXTMENU(MatchcodeItem), NO_COLUMNHEADER, AUTO_POSITION, ENTIRE, 100, 13, 200, 10) [ INITIALIZE : "partner" SetFormatName(, Matchcode) ["CX_KEYWORD::Key()" COLOR BLUE FIX_WIDTH(200) ] SetFormat(, Matchcode) "cast" AddFormatName(, Matchcode) "CX_KEYWORD::Key()" ClearFormat(, Matchcode) ["CX_KEYWORD::Key()" COLOR RED ] SetFormat(, Matchcode) // Add title format, that is only used once! "title" AddFormatName(, Matchcode) "CX_KEYWORD::Key()" ClearFormat(, Matchcode) [ "CX_KEYWORD::Key()" COLOR GREEN ] SetFormat(, Matchcode) // Update title object in list titleCode UpdateObox(, Matchcode) // Remove title format again, it is not used any more! "title" RemoveFormatName(, Matchcode) DOUBLE_CLICK: GetObject Dup if { [ Swap ] OboxEdit } else Drop ]