| |
|
|
- Page 1 - |
|
Julian Schmidt | Why fails here the Mark and abwählen all Entries in the Multiple choice-Listbox? CompileMarkSeparationdeclare choosedialog&,listbox&,aktiontuen&,markall&,delmark&,text$[]
var StringCount%=3
text$[1]=0
text$[2]=1
text$[3]=2
windowstyle 24
choosedialog&=Create("Window",%hwnd,"Auswahl-Dialog",%MaxX\2,%MaxY\3,500,400)
listbox&=Create("ListBox", choosedialog&, 2, 20, 20, 250, Height(choosedialog&)-40)
Create("Text",choosedialog&,"Bitte wählen Sie Einträge, auf dennen eine Aktion ausführt werden soll aus.",290,30,190,60)
whileloop StringCount%
AddString(listbox&,text$[&loop])
Endwhile
MoveListToHandle(listbox&)
aktiontuen&=@Create("Button",choosedialog&,"Aktion ausführen",290,Height(choosedialog&)-80,185,60)
markall&=@Create("Button",choosedialog&,"Alle Markieren",290,110,185,40)
delmark&=@Create("Button",choosedialog&,"Markierungen aufheben",290,160,185,40)
while 1
waitinput
if getfocus(markall&)
whileloop GetCurSel(listbox&)+1
Sendmessage(listbox&,$0186,&loop-1,0)
Setfocus(listbox&)
Endwhile
elseif getfocus(delmark&)
whileloop GetCurSel(listbox&)+1
Sendmessage(listbox&,$0186,&loop-1,1)
Setfocus(listbox&)
Endwhile
elseif getfocus(aktiontuen&)
whileloop GetCurSel(listbox&)+1
case GetState(listbox&, &loop-1)>0 : Messagebox(text$[&loop],"Info",0)
Endwhile
end
elseif %key=2
end
Endif
Endwhile
|
|
|
| ˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗ Webseite [...] | 04/28/11 ▲ |
|
|
|
|
« this Posting watts as Solution marked. » |
|
Jörg Sellmeyer | you have The incorrect Message uses and You can it plainer make: CompileMarkSeparation
if getfocus(markall&)
Sendmessage(listbox&,$0185,1,-1)'lb_SetSel statt lb_SetCurSel
'außerdem hast Du die letzten Parameter vertauscht. Der vorletzte bestimmt, ob markiert wird. Der letzte bestimmt den Eintrag. -1 steht für alle Einträge
elseif getfocus(delmark&)
Sendmessage(listbox&,$0185,0,-1)
elseif getfocus(aktiontuen&pan>
unclear is me, why you here CompileMarkSeparation GetCursel verwendest. You want still any (ent-)Mark. means müßtest You then already GetCount take. but -1 is rather. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 04/28/11 ▲ |
|
|
|
|
|
| with the variables can you too well still not bypass, though You in your last Thread already repeatedly hereon hingewiesen became. CompileMarkSeparationtext$[1]=0
text$[2]=1
text$[3]=2
ist falsch
text$[1]="0"
text$[2]="1"
text$[3]="2"
ist rich >
here clutching probably the automatic Typenwandlung, but the can also time go wrong. 0 = a number, "0" is a String and You want Yes Text$[] |
|
|
| |
|
|
|
Julian Schmidt | Have my Minibeispiel time something extended. CompileMarkSeparationdeclare choosedialog&,listbox&,aktiontuen&,markall&,delmark&,text$[]
var StringCount%=5
text$[1]="eins"
text$[2]="zwei"
text$[3]="drei"
text$[4]="vier"
text$[5]="fünf"
windowstyle 24
choosedialog&=Create("Window",%hwnd,"Auswahl-Dialog",%MaxX\2,%MaxY\3,500,400)
listbox&=Create("ListBox", choosedialog&, 2, 20, 20, 250, Height(choosedialog&)-40)
Create("Text",choosedialog&,"Bitte wählen Sie Einträge, auf dennen eine Aktion ausführt werden soll aus.",290,30,190,60)
whileloop StringCount%
AddString(listbox&,text$[&loop])
Endwhile
MoveListToHandle(listbox&)
aktiontuen&=@Create("Button",choosedialog&,"Aktion ausführen",290,Height(choosedialog&)-80,185,60)
markall&=@Create("Button",choosedialog&,"Alle Markieren",290,110,185,40)
delmark&=@Create("Button",choosedialog&,"Markierungen aufheben",290,160,185,40)
var ukmark&=@Create("Button",choosedialog&,"Markierungen umkehren",290,210,185,40)
while 1
waitinput
if getfocus(markall&)
Sendmessage(listbox&,$0185,1,-1)
elseif getfocus(delmark&)
Sendmessage(listbox&,$0185,0,-1)
elseif getfocus(ukmark&)
whileloop GetCount(listbox&)
if GetState(listbox&, &loop-1)>0
Sendmessage(listbox&,$0185,0,&loop-1)
else
Sendmessage(listbox&,$0185,1,&loop-1)
Endif
Endwhile
setfocus(choosedialog&)
elseif getfocus(aktiontuen&)
whileloop GetCount(listbox&)
case GetState(listbox&, &loop-1)>0 : Messagebox(text$[&loop],"Info",0)
Endwhile
end
elseif %key=2
end
Endif
ref='./../../Function-References/XProfan/endwhile/'>Endwhile
|
|
|
| ˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗ Webseite [...] | 04/29/11 ▲ |
|
|
|