Skip to content

Commit

Permalink
Fix memo scroll bar missing on creating
Browse files Browse the repository at this point in the history
  • Loading branch information
thisdp committed Jul 16, 2023
1 parent 3504402 commit 05fc2d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Core/memo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ function dgsCreateMemo(...)
}
dgsSetParent(memo,parent,true,true)
calculateGuiPositionSize(memo,x,y,relative or false,w,h,relative or false,true)
onDGSElementCreate(memo,sRes) --This event should be called before child element attachment, to make sure every property is ready
local abx,aby = dgsElementData[memo].absSize[1],dgsElementData[memo].absSize[2]
local scrollbar1 = dgsCreateScrollBar(abx-20,0,20,aby-20,false,false,memo)
local scrollbar2 = dgsCreateScrollBar(0,aby-20,abx-20,20,true,false,memo)
dgsSetVisible(scrollbar1,false)
dgsSetData(scrollbar1,"length",{0,true})
dgsSetData(scrollbar2,"length",{0,true})
dgsSetData(scrollbar1,"multiplier",{1,true})
Expand All @@ -267,7 +267,6 @@ function dgsCreateMemo(...)
dgsElementData[memo].scrollbars = {scrollbar1,scrollbar2}
handleDxMemoText(memo,text,false,true)
dgsAddEventHandler("onDgsMouseMultiClick",memo,"dgsMemoMultiClickCheck",false)
onDGSElementCreate(memo,sRes)
dgsMemoRecreateRenderTarget(memo,true)
return memo
end
Expand Down

0 comments on commit 05fc2d6

Please sign in to comment.