Trying to modifie the tooltip.lua so made a simple image

The problem im facing is that the tooltip background image always scaling dynamically with text size so it makes my image stretch so i was wondering how or if its even possible to dont affect the sides of the images so it wonth stretch and just instead apply slice scaling (image clipping) so basically it would add chunk by chunk from the middle something like here in this image example
This is the code i wrote so far

The problem im facing is that the tooltip background image always scaling dynamically with text size so it makes my image stretch so i was wondering how or if its even possible to dont affect the sides of the images so it wonth stretch and just instead apply slice scaling (image clipping) so basically it would add chunk by chunk from the middle something like here in this image example

This is the code i wrote so far
LUA:
addEvent(function()
toolTipLabel = g_ui.createWidget('UILabel', rootWidget)
local toolTipBase = g_ui.createWidget('TooltipPanel', toolTipLabel)
toolTipBase:setVisible(false)
toolTipLabel:setId('toolTip')
toolTipLabel:setImageSource('/images/ui/popup/tooltip')
toolTipLabel:setTextAlign(AlignCenter)
toolTipLabel:hide()
end)
end
toolTipLabel:getChildById('tooltipBase'):setVisible(false)
toolTipLabel:parseColoredText(text, "white")
toolTipLabel:resizeToText()
local paddedWidth = toolTipLabel:getWidth() + 30
local paddedHeight = toolTipLabel:getHeight() + 10
toolTipLabel:resize(paddedWidth, paddedHeight)
end
toolTipLabel:show()
toolTipLabel:raise()
toolTipLabel:enable()
moveToolTip(true)
g_effects.fadeIn(toolTipLabel, 10)