• 0.958798882681564

    posted a message on EditBox not showing initial text
    cb_edit1:SetCursorPosition(0)

    this fixes it, if you cursor backwards the text comes into view, so 'SetCursorPosition(0)' fixes it

    Thanks

    Posted in: Need Help?
  • 0

    posted a message on EditBox not showing initial text

    Thanks.

    Another weird thing is that if I set the parent of the EditBox to UIParent (and adjust setPoint to make it show) it works fine and loads edit box with initial value in main game window... but change parent to options page and not work?

     

    Posted in: Need Help?
  • 0

    posted a message on EditBox not showing initial text

    function HelloWorld:CreateEditBox(text, parent)
    	local eb = CreateFrame("EditBox", nil, parent, "InputBoxTemplate")
    	eb:SetFontObject("GameFontWhite")
    	eb:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE")
    	eb:SetText(text)
    	eb:SetSize(160, 20)
    	eb:SetAutoFocus(false)
    	return eb
    end
    

    Excuse my ignorace... I am trying to get text input from the user, I got label and check box working... but edit box is giving me problems when trying to show an initial value? I used SetText but it seems like text is not there but when I click on it. I can copy and paste it... it is there, it is just not displaying right? but why does it start displaying right when I start typing? how can I make it show an initial value like it does when I type? What am I doing wrong?

     

    Please and thanks.

    local cb_edit1 = self:CreateEditBox("test1", self.panel_main)
    cb_edit1:SetPoint("TOPLEFT", cb_combat, 0, -30)
    
    local cb_edit2 = self:CreateEditBox("test2", self.panel_main)
    cb_edit2:SetPoint("TOPLEFT", cb_edit1, 0, -30)
    

    code @ https://github.com/rakkarage/HelloWorldAddon

    based on @ https://github.com/ketho-wow/HelloWorld

    Posted in: Need Help?
  • To post a comment, please or register a new account.