O.K. Das mir keiner einen fertigen Code liefern kann hatte ich befürchtet
Aber vielleicht kann mir dennoch jemand einen Tipp geben...
Ich glaube, ich stehe kurz vor einem Etappensieg mit :
Code: Alles auswählen
oLB := ListBox{12,16, 9,32}
oLB:AddItem("Text1")
oLB:AddItem("Text2")
oLB:AddItem("Text3")
item := oLB:Show()
do case
case item = "Text1"
@ 20, 20 say 'Text1 ausgewaehlt!'
endcase
Hat vielleicht jemand eine Idee weshalb das "do case" so nicht funktioniert und ein
"Data type mismatch in equals '=' operation" liefert?
Grüße
Jojo
P.S.: Falls sich jemand tiefergehend damit auseinandersetzen möchte, hier die Beschreibung der Funktion ListBox (aus der ich leider nicht schlauer werde
):
ListBox Class
The ListBox Class creates and manages list boxes and combo boxes. The Achoice() function is based on ListBox class.
List boxes and combo boxes display a list of items or choices to the user. The list box methods will allow you to add,
arrange, remove, and interrogate the list of items. When one of the items is selected, ListBox:CurrentItem,
ListBox:CurrentItemNo, ListBox:TextValue, and ListBox:Value are updated.
ListBox Class Index
AddItem() METHOD Add (append) a new item to a list box
Bitmap ACC/ASS Display bitmap as list box item
Bottom ACC/ASS Bottommost screen row of the box
Buffer ACC Position in the list of the selected item
CapCol ACC/ASS Screen column of the list box's caption
CapRow ACC/ASS Screen row of the list box's caption
Caption ACC/ASS String that describes the list box caption
Cargo ACC/ASS A user value of any type
ChangeSelected() METHOD Change a range of items in a multiple selection
ClassName() METHOD For compatibility to Clipper's getsys.prg only
Clear() METHOD Clear (delete) all items in a list box
ClearSelection() METHOD Clear a multiple selection list box
Close() METHOD Closes the combo box ("drop-down list box")
ColdBox ACC/ASS Frame of list box without focus
ColorSpec ACC/ASS Color attributes for Terminal i/o
ColumnLeft ACC/ASS Number of the leftmost visible column
CurrentItem ACC/ASS String representing the displayed listbox item
CurrItemNo ACC/ASS Numeric value indicating the selected item
CurrentText ACC/ASS Fix ""
DeleteItem() METHOD Remove an item from a list box
DelItem(p1) METHOD Remove an item from a list box
DeselectItem() METHOD Turn off the selection of a specified item
Destroy() METHOD Destroys the ListBox object
Display() METHOD Show the list box and its caption on the screen
DropDown ACC Indicator of list box or combo box
Exec() METHOD Process user input, same as :Show()
Fblock ACC/ASS Code block evaluated at receiving/loosing focus
FillUsing() METHOD Data server/dictionary driver
FindItem() METHOD Search a list box for a specified item
FindText() METHOD Search a list box for a specified string
FirstSelected() METHOD Position of the 1st item in a multiple selection
Font ACC/ASS Font object used to display the list box items
GetData() METHOD Get the data portion of a list box item
GetItem() METHOD Get the item property
GetItemValue() METHOD Same as GetData()
GetText(p1) METHOD Get the item text
GuiColor ACC/ASS Color attributes for GUI mode
HasFocus ACC Indicates whether the object has input focus
HitTest() METHOD Determines if the mouse cursor is within the box
HotBox ACC/ASS Frame of list box with focus
InputBlock ACC/ASS CodeBlock for default/user keyboard handler
InsItem() METHOD Insert a new item to a list box
IsOpen ACC Indicator whether the combo box widget is visible
ItemCount ACC Number of items in the list
KillFocus() METHOD Take input focus away from a ListBox object
Left ACC/ASS Leftmost screen column of the box
ListFiles() METHOD Fill a list box with the names of matching files
Message ACC/ASS String displayed in the windows status bar
Modified ACC/ASS Ignored.
NextItem() METHOD Skip to the next available item
NextSelected() METHOD Skip to the next selected item
Open() METHOD Opens the combo box (drop-down box)
PrevItem() METHOD Skip to the previous available item
Right ACC/ASS Rightmost screen column of the box
Sblock ACC/ASS Code block evaluated at user selection
Scroll() METHOD Scrolls the contents of a list box up or down
Select() METHOD Change the selected item in a list
SelectBySingleClick ACC/ASS Allow selection by left mouse same as Enter
SelectBySpace ACC/ASS Allow selection by space key same as Enter
SelectedCount ACC Number of items selected in a multiple selection
SelectedFile ACC Selected file filled by :ListFiles()
SelectItem() METHOD Change the selected item in a list
SetData() METHOD Change the property of an available item
SetFocus() METHOD Set input focus to a ListBox object
SetItem() METHOD Replaces the item property
SetText() METHOD Change/replace the displayed text of item
SetTop() METHOD Move a specified item to the top of the list box
Show() METHOD Show the list box and its caption on the screen
TextValue ACC/ASS String representing the displayed listbox item
ToolTip ACC/ASS Short pop-up info message
Top ACC/ASS Topmost screen row of the box
TopItem ACC/ASS Position of the first visible item
TypeOut ACC/ASS Indicator whether the list contains any items
Value ACC/ASS Any value associated with the specified item
ValueChanged ACC/ASS Indicator representing the status of :Value
Vscroll ACC/ASS Ignored in FlagShip