English
Forum

Listbox - any Entries Mark

 
- Page 1 -



Julian
Schmidt
Why fails here the Mark and abwählen all Entries in the Multiple choice-Listbox?
CompileMarkSeparation
declare 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
whileloop GetCurSel(listbox&)+1

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.
CompileMarkSeparation
text$[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$[]
 
04/28/11  
 




Julian
Schmidt
Have my Minibeispiel time something extended.
CompileMarkSeparation
declare 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  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.648 Views

Untitledvor 0 min.
Thomas Zielinski10/22/20
RudiB.04/05/20
Georg Teles02/06/16
Torsten Rümker06/03/15
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie