English
Source / code snippets

Anklicken boxing Check create Listbox

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Listbox erstellen (mit Check-Boxen zum Anklicken)
Lauffähig ab Profan-Version 5.0
Seterrorlevel 0  SEHR WICHTIG WEGEN NEGATIVER FENSTERGRÖSSE!!!
Def GetSysColor(1) !USER32,GetSysColor
SETTRUECOLOR 1
DECLARE ENDE%,i%,Button2%,Top%,last%,now%
DECLARE LISTBOX1%,font%,font2%,STATIC&
DECLARE BUTTON1%,ZEILE$,ausgabeliste%
Declare box%[1000]

PROC LISTREFRESH

    Top%=@SendMessage(Listbox1%,398,0,0)
    Top%= Top%*13
    Top%= Top%-Top%*2
    setwindowpos static&=0,Top%-15,5000;0 Sonst isser im Hintergrund ;)
    showwindow(static&,1)

ENDPROC

PROC LESEN

    i%=0

    Whilenot equ(i%,@GetCount(listbox1%))

        setfocus(box%[i%])

        if getcheck(box%[i%])

            addstring(ausgabeliste%,@Trim$(@GetString$(listbox1%,i%)))

        endif

        inc i%

    Wend

    addstring(ausgabeliste%,***********************************************************************************)
    setfocus(%HWND)

ENDPROC

font%=@CREATE(FONT,MS Sans Serif,13,0,0,0,0)
WINDOWSTYLE 63
WINDOWTITLE CHECKLISTBOX (c) by Rolf Koch 2003
WINDOW 214,134-429,518
CLS GETSYSCOLOR(15)
USEFONT MS Sans Serif,8,0,0,0,0
SETDIALOGFONT 1
LISTBOX1% = CREATE(LISTBOX,%HWND,,0012,0013,0401,0107)
STATIC&= Control(STATIC,,$5400010E,0,0,15,5000,LISTBOX1%,2000,%hinstance)
AUSGABELISTE% = CREATE(LISTBOX,%HWND,,0012,0123,0401,0200)
BUTTON1% = CREATE(BUTTON,%HWND,Good by,0091,0430,0228,0033)
BUTTON2% = CREATE(BUTTON,%HWND,Auslesen,0091,0390,0228,0033)
clearlist
ASSIGN #1,ADD$($WINPATH,WIN.INI)
RESET #1

WHILENOT eof(#1)

    input #1,zeile$
    addstring(listbox1%,add$(     ,zeile$))

WEND

CLOSE #1
Checkboxen hinzufügen - beim Neuerstellen: Clear box%[]!

Whilenot equ(i%,@GetCount(listbox1%))

    box%[i%]=createcheckbox(STATIC&,,1,mul(i%,13),13,13)
    inc i%

wend

WHILENOT ENDE%

    LISTREFRESH MUSS VOR WAITINPUT (Wegen Focus)
    Waitinput

    If @EQU(%KEY,2)

        LET ENDE%= 1

    ELSEIF GETFOCUS(BUTTON1%)  BUTTON

        LET ENDE%=1

    ENDIF

    IF GETFOCUS(BUTTON2%)

        LESEN

    ELSEIF GETFOCUS(LISTBOX1%)

        if equ(getcheck(box%[@GetCursel(Listbox1%)]),0)

            setcheck box%[@GetCursel(Listbox1%)],1

        elseif equ(getcheck(box%[@GetCursel(Listbox1%)]),1)

            setcheck box%[@GetCursel(Listbox1%)],0

        ENDIF

        Top%=@SendMessage(Listbox1%,398,0,0)
        Top%= Top%*13
        Top%= Top%-Top%*2
        setwindowpos static&=0,Top%-0,0;0 Sonst isser im Hintergrund ;)
        showwindow(static&,1)
        setfocus(%HWND)

    ELSEIF GETFOCUS(AUSGABELISTE%)

        getmessage

    ENDIF

WEND

 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.057 Views

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


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