Programmer Guide/Macro Library/SHOWITEM: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:ShowItem - Display shell item properties and/or data}}
==SHOWITEM==
SHOWITEM itemname [ ; <var>title</var> ]
:Show properties or data of the [[Programmer_Guide/Shell_Items|shell item]] <var>itemname</var> in a popup dialog.


Provides a way of viewing shell items. Currently <code>WAVE</code>, <code>TABLE</code>, <code>VALUE</code> and <code>FILE</code> items are supported.
{|class="einrahmen"
!argument !!description
|-
|<var>itemname</var>
|The name of the shell item to be displayed
|-
|<var>title</var>
|The dialog window caption
|-
!RESULT !!description
|-
|''undefined'' || the return value of this macro is undefined and should always be ignored
|}


=====Usage:=====


<code>SHOWITEM <var>item</var> [; <var>title</var>]</code>
The displayed data depend on the type of the shell item <var>itemname</var>.
 
;[[Programmer_Guide/Shell_Items/Table|''simple'' table]]: The content (data entries) of the table is displayed. The conext menu functions can be used to copy or save the data.
<code>SHOWITEM <var>numericItem</var> [; <var>title</var> ; <var>wndPos</var> ]</code>
;[[Programmer_Guide/Shell_Items/Table|''extended'' table and ''parameter'' table]]: The content of the table can be displayed in 3 formats ('''Format=read''', '''Format=write''', '''default'''). If the format '''default''' is selected, the table fields are displayed in separate columns. Also the field definitions ('''Field Defs.''') can be displayed. The different formats are selected in the context menu, which also implements functions to copy or save the table content. Tagged entries are selected.
 
;[[Programmer_Guide/Shell_Items/Value|value]]: Display the numerical data hold by the value item. The conext menu functions can be used to copy or save the data.
<code>SHOWITEM <var>tableItem</var> [; <var>title</var> ; <var>text</var> ; <var>width</var> ; <var>font</var> ; <var>wndPos</var>]</code>
;[[Programmer_Guide/Shell_Items/File|''text'' file and ''xml'' file]]: Display the content of the file item. Text files are displayed as a list (line by line) and the elements of xml files are displayed as a tree.
 
;[[Programmer_Guide/Shell_Items/File|''section'' file]]: A list of all sections of the file is displayed, and the content of each section can be viewed in a text window.
=====Parameters:=====
 
itemThe id of a shell item.tableItemThe id of a table item.numericItemThe id of a numeric item.titleThe string to use as the title of the dialog.textA string to be shown at the top of the dialog (but below the title). This parameter is ignored if the table is a parameter table.widthThe width of the table listbox. This parameter is ignored if the table is a parameter table.fontThe font to use for the table listbox. This parameter is ignored if the table is a parameter table.;<var>wndPos</var>
 
The position at which to display the window. These are the four values 'x y w h' as used by [[Programmer Guide/Macro Library/SETWINDOWPOS|SetWindowPos]].=====Result:=====
 
An empty string.
 
=====Notes:=====
 
This macro replaces <code>SHOWTABLE</code> and <code>SHOWFILE</code> as of version 3.7.0.
 
Vector and array value items as well as parameter table items are shown using the same method as numeric tables.

Latest revision as of 09:16, 10 January 2017

SHOWITEM itemname [ ; title ]
Show properties or data of the shell item itemname in a popup dialog.
argument description
itemname The name of the shell item to be displayed
title The dialog window caption
RESULT description
undefined the return value of this macro is undefined and should always be ignored


The displayed data depend on the type of the shell item itemname.

simple table
The content (data entries) of the table is displayed. The conext menu functions can be used to copy or save the data.
extended table and parameter table
The content of the table can be displayed in 3 formats (Format=read, Format=write, default). If the format default is selected, the table fields are displayed in separate columns. Also the field definitions (Field Defs.) can be displayed. The different formats are selected in the context menu, which also implements functions to copy or save the table content. Tagged entries are selected.
value
Display the numerical data hold by the value item. The conext menu functions can be used to copy or save the data.
text file and xml file
Display the content of the file item. Text files are displayed as a list (line by line) and the elements of xml files are displayed as a tree.
section file
A list of all sections of the file is displayed, and the content of each section can be viewed in a text window.

Navigation menu

Personal tools