Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; удалялка строк версия 1.0
- OpenWindow(0,100,100,520,280,"Удалялка строк",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
- Enumeration
- #pole1
- #pole2
- #button
- #str
- EndEnumeration
- EditorGadget(#pole1, 10, 40, 190, 230)
- For l=1 To 20
- txt$ = Str(l)
- AddGadgetItem(#pole1,-1,txt$)
- Next
- EditorGadget(#pole2, 330, 40, 190, 230)
- ButtonGadget(#button, 210, 190, 100, 25, "Тыдыщ")
- TextGadget(#PB_Any, 210, 40, 120, 20, "Удалить каждые")
- StringGadget(#str, 210, 70, 100, 25, "3")
- TextGadget(#PB_Any, 210, 100, 120, 20, "строки из поля 1")
- TextGadget(#PB_Any, 10, 10, 100, 25, "Поле 1")
- TextGadget(#PB_Any, 320, 10, 100, 25, "Поле 2")
- Repeat
- ev = WaitWindowEvent()
- Select ev
- Case #PB_Event_Gadget
- Select EventGadget()
- Case #button
- Select EventType()
- Case #PB_EventType_LeftClick
- ClearGadgetItems(#pole2)
- i = 1 + Val(GetGadgetText(#str))
- m = CountGadgetItems(#pole1)
- For k=0 To m
- If (k + i)%i=0
- stay$ = GetGadgetItemText(#pole1,k)
- AddGadgetItem(#pole2,-1,stay$)
- EndIf
- Next
- EndSelect
- EndSelect
- EndSelect
- Until ev = #PB_Event_CloseWindow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement