PHP Code:
def __init__(self):
ui.Window.__init__(self)
self.Board = ui.BoardWithTitleBar()
self.Board.SetSize(300, 500)
self.Board.SetCenterPosition()
self.Board.AddFlag('movable')
self.Board.AddFlag('float')
self.Board.SetTitleName("Test")
self.Board.SetCloseEvent(self.Close)
self.Board.Show()
self.mainbutton = self.__SetButton(self.Board,50,100,"Base")
self.mainbutton.Show()
self.mainbutton.SetEvent(self.__CreateSubFunction)
def __CreateSubFunction(self):
res = self.__SetButton(self.mainbutton,10,10,"1")
res.Show()
return res
def __SetButton(self,parent,x,y,text):
button = ui.Button()
button.SetParent(parent)
button.SetPosition(x,y)
button.SetUpVisual('d:/ymir work/ui/public/big_button_01.sub')
button.SetOverVisual('d:/ymir work/ui/public/big_button_02.sub')
button.SetDownVisual('d:/ymir work/ui/public/big_button_03.sub')
button.SetText(text)
return button
PHP Code:
def __SetButton(self,parent,x,y,text):
button = ui.Button()
button.SetParent(parent)
button.SetPosition(x,y)
button.SetUpVisual('d:/ymir work/ui/public/big_button_01.sub')
button.SetOverVisual('d:/ymir work/ui/public/big_button_02.sub')
button.SetDownVisual('d:/ymir work/ui/public/big_button_03.sub')
button.SetText(text)
return button
iam solved it, just button to self.button






