Entry
TSE: List: Column: 2: Create: How to: How to create a 2 column list in TSE?
Nov 25th, 2004 09:28
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 26 September 2004 - 10:41 pm ------------------
TSE: List: Column: 2: Create: How to: How to create a 2 column list in
TSE?
A list in its minimal form is like a one dimensional (thus 1 column)
array.
A list with values is basically a two dimensional (thus 2 column)
array.
---
---
e.g.
---
---
--- cut here: begin --------------------------------------------------
FORWARD PROC Main()
FORWARD PROC PROCFileCreateListChoice( STRING s1 )
FORWARD PROC PROCFileCreateListChoiceCurrent()
FORWARD STRING PROC FNStringGetListChoiceInputS( STRING s1, INTEGER
i1 )
FORWARD STRING PROC FNStringGetListChoiceMainS( STRING s1, INTEGER
i1 )
// --- MAIN --- //
PROC Main()
Message( FNStringGetListChoiceMainS( "YourTemporaryFile", 4 ) )
END
<F12> Main()
// --- LIBRARY --- //
// library: string: get: list: choice: main
(filenamemacro=getstcma.s) [kn, ri, su, 26-09-2004 22:55:55]
STRING PROC FNStringGetListChoiceMainS( STRING filenameS, INTEGER
posI )
// e.g. PROC Main()
// e.g. Message( FNStringGetListChoiceMainS( "YourTemporaryFile",
4 ) )
// e.g. END
// e.g.
// e.g. <F12> Main()
STRING s[255] = ""
PushPosition()
PROCFileCreateListChoice( filenameS )
s = FNStringGetListChoiceInputS( filenameS, posI )
PopPosition()
RETURN( s )
END
// library: file: create: list: choice (filenamemacro=creafilc.s)
[kn, ri, su, 26-09-2004 22:56:32]
PROC PROCFileCreateListChoice( STRING filenameS )
// e.g. PROC Main()
// e.g. PROCFileCreateListChoice( "c:\temp\ddd.txt" )
// e.g. END
// e.g.
// e.g. <F12> Main()
EditFile( filenameS )
PROCFileCreateListChoiceCurrent()
END
// library: string: get: list: choice: input
(filenamemacro=getstcip.s) [kn, ri, su, 26-09-2004 22:47:56]
STRING PROC FNStringGetListChoiceInputS( STRING filenameS, INTEGER
posI )
// e.g. PROC Main()
// e.g. Message( FNStringGetListChoiceInputS( "c:\temp\ddd.txt",
4 ) ) // gives e.g. ...""
// e.g. END
// e.g.
// e.g. <F12> Main()
STRING s[255] = ""
//
PushPosition()
//
EditFile( filenameS )
//
IF Llist( "<Your window title>", 80, 22, _ENABLE_SEARCH_ +
_ANCHOR_SEARCH_ + _ENABLE_HSCROLL_ )
//
s = GetText( 1, 255 )
posI = Pos( " ", s )
IF ( posI <> 0 )
// take out everything after position 'posI'
s = SubStr( s, posI, Length( s ) - posI + 1 )
s = Trim( s )
ENDIF
Warn( s )
//
ENDIF
//
AbandonFile()
//
PopPosition()
//
RETURN( s )
END
// library: file: create: list: choice: current
(filenamemacro=creaficc.s) [kn, ri, su, 26-09-2004 22:56:37]
PROC PROCFileCreateListChoiceCurrent()
// e.g. PROC Main()
// e.g. PROCFileCreateListChoiceCurrent()
// e.g. END
// e.g.
// e.g. <F12> Main()
AddLine( "A Option 1" )
AddLine( "B Option 2" )
AddLine( "C Option 3" )
AddLine( "D Option 4" )
END
--- cut here: end ----------------------------------------------------
---
---
Internet: see also:
---
TSE: List: Create: Overview: Can you give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/31624/fid/1711
----------------------------------------------------------------------