home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga ACS 1998 #6
/
amigaacscoverdisc1998-061998.iso
/
w_acs
/
blitz
/
okno_acs.bb2
Wrap
Text File
|
1998-06-08
|
2KB
|
86 lines
;
; Przyklad na tworzenie i obsluge
; gadzetow wykorzystujacych biblioteke
; gadtools, oraz ich obslugi.
;
;
; Maciej Matyka'98
WbToScreen 0
Use Screen 0
NEWTYPE.lv
nr.w
name.s
End NEWTYPE ; lv
Dim List MyList.lv(8)
AddItem MyList() : MyList()\name="Poz 1"
AddItem MyList() : MyList()\name="Poz 2"
AddItem MyList() : MyList()\name="Poz 3"
AddItem MyList() : MyList()\name="Poz 4"
AddItem MyList() : MyList()\name="Poz 5"
AddItem MyList() : MyList()\name="Poz 6"
AddItem MyList() : MyList()\name="Poz 7"
AddItem MyList() : MyList()\name="Poz 8"
AddItem MyList() : MyList()\name="Poz 9"
GTListView 0,7,147,5,87,56,"",0,MyList()
GTText 0,8,146,64,92,15,"Poz",1,"1"
GTPalette 0,0,19,6,48,57,"",0,3,1
GTText 0,1,59,64,40,13,"Kolor",1,"0"
GTString 0,2,325,5,106,13,"Tekst",1,256,"-"
GTText 0,3,330,27,123,12,"Wpisales",1,"-"
cy_Cycle$="Pozycja 1|Pozycja 2|Pozycja 3|Pozycja 4"
GTCycle 0,4,56,108,116,16,"Cycle",1,cy_Cycle$,2
GTSlider 0,5,64,87,216,9,"Slider",1,1,45,13
GTText 0,6,289,86,61,11,"",0,"13"
GTButton 0,9,389,81,113,53,"Koniec",0
GTCheckBox 0,10,352,122,26,11,"Wyjscie ON/OFF",257
AddIDCMP $10
Window 0,73,67,517,151,$0001100E,"Okno",1,0
AttachGTList 0,0
GTBevelBox 0,254,13,231,41,0
Repeat
ev.l=WaitEvent
ec.l=EventCode
gh.l=GadgetHit
Select ev
Case 64
Select gh
Case 0
GTSetString 0,1,Str$(ec)
Case 2
GTSetString 0,3,GTGetString(0,2)
Case 5
GTSetString 0,6,Str$(ec)
Case 7
GTSetString 0,8,Str$(ec+1)
Case 9
ev.l=$200
Case 10
a=GTStatus(0,10)
Select a
Case 0
GTDisable 0,9
Redraw 0,9
Case 1
GTEnable 0,9
Redraw 0,9
End Select
End Select
End Select
Until ev.l=$200
End