From f523c216d18508808f287d370094f7c632465b12 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Sat, 21 Jul 2018 17:07:37 +0300 Subject: [PATCH] fix size AceGUIWidget-MultiLineEditBox --- .../widgets/AceGUIWidget-MultiLineEditBox.lua | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua index 4e6fc37..24a4585 100644 --- a/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua +++ b/ElvUI_Config/Libraries/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua @@ -101,7 +101,7 @@ end local function OnMouseUp() -- ScrollFrame local self = this.obj.editBox self:SetFocus() - EditBoxSetCursorPosition(self, self:GetNumLetters()) +-- EditBoxSetCursorPosition(self, self:GetNumLetters()) end local function OnReceiveDrag() -- EditBox / ScrollFrame @@ -123,16 +123,14 @@ local function OnReceiveDrag() -- if not this.hasfocus then this.hasfocus = true editBox:SetFocus() - EditBoxSetCursorPosition(editBox, editBox:GetNumLetters()) +-- EditBoxSetCursorPosition(editBox, editBox:GetNumLetters()) end editBox:Insert(info) self.button:Enable() end local function OnSizeChanged() -- ScrollFrame - this:UpdateScrollChildRect() - this:SetVerticalScroll(this:GetHeight()) - this.obj.editBox:SetWidth(arg1) + this.obj.editBox:SetWidth(this.obj.editBox:GetWidth()) end local function OnTextChanged() -- EditBox @@ -150,8 +148,8 @@ end local function OnTextSet() -- EditBox this:HighlightText(0, 0) - EditBoxSetCursorPosition(this, this:GetNumLetters()) - EditBoxSetCursorPosition(this, 0) +-- EditBoxSetCursorPosition(this, this:GetNumLetters()) +-- EditBoxSetCursorPosition(this, 0) this.obj.button:Disable() end @@ -272,14 +270,20 @@ local methods = { end, ["GetCursorPosition"] = function(self) - return EditBoxGetCursorPosition(self.editBox) + --return EditBoxGetCursorPosition(self.editBox) end, ["SetCursorPosition"] = function(self, pos) - return EditBoxSetCursorPosition(self.editBox, pos) + --return EditBoxSetCursorPosition(self.editBox, pos) end, + ["OnWidthSet"] = function(self, width) + self.scrollFrame:SetWidth(width) + end, + ["OnHeightSet"] = function(self, height) + self.scrollFrame:SetHeight(height) + end } --[[-----------------------------------------------------------------------------