Its so simple, but i am to silly.
i want simply create a button in lua using that:
Code:
local button = CreateFrame("Button", "only_for_testing", mainframe)
button:SetPoint("CENTER", mainframe, "CENTER", 0, 0)
button:SetWidth(200)
button:SetHeight(50)
button:SetText("My Test")
button:SetNormalFontObject("GameFontNormalSmall")
button:SetNormalTexture("Interface/Buttons/UI-Panel-Button-Up")
button:SetHighlightTexture("Interface/Buttons/UI-Panel-Button-Highlight")
button:SetPushedTexture("Interface/Buttons/UI-Panel-Button-Down")
I see the button but the text is set to the bottomleft of the button and it seems so, i can do, whatever i want, i dont get it to the center of the button.