Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If OpenWindow(0,100,100,100,100,"Кнопки")
- ButtonGadget(0,10,10,80,30,"батон")
- button_y = 10
- window_height = 100
- Repeat
- ev = WaitWindowEvent()
- If ev = #PB_Event_Gadget And EventGadget() = 0
- button_y + 30
- window_height + 30
- ResizeWindow(0,100,100,100,window_height)
- i + 1
- txt$ = "батон " + i
- ButtonGadget(#PB_Any,10,button_y,80,30,txt$)
- EndIf
- ;закрывашка по ескейпу. весь код написан руками, кроме закрывашки
- If CreatePopupMenu(0) : MenuItem(1, "Quit") : EndIf
- If ev = #PB_Event_Menu And EventMenu() = 1 : End : EndIf
- AddKeyboardShortcut(0, #PB_Shortcut_Escape, 1)
- Until ev = #PB_Event_CloseWindow
- EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement