[JW Lua] Dialog scaling bug not fixed when changing the positions afterwards
Jan Angermüller
jan at angermueller.com
Wed Oct 25 13:12:26 CEST 2017
Jari,
some versions ago you fixed the different scaling/positioning bug for
dialogs on MacOS/Windows.
Today I noticed that the bug fix seem to only affect the
scaling/positioning when creating the dialog.
If the dialog is changed on the fly afterwards, the values are still
scaled differently (on Windows! Haven't tested MacOS).
Below is the test script which shows different positions when using
CreateButton(x,y) compared to SetLeft(x) / SetTop(y).
Clicking on the "select" button should use the same position as before,
but it changes.
This is how the script looks in action: https://youtu.be/gprmtghPbAs
It is relevant when I have a dialog with a "standard" and an "extended"
version which use slightly different positions.
Jan
local str=finale.FCString()
str.LuaString="Test"
local dialog = finale.FCCustomLuaWindow()
dialog:SetTitle(str)
local static1= dialog:CreateStatic(0,0)
str.LuaString = "Test:"
static1:SetWidth(120)
static1:SetText(str)
local button = dialog:CreateButton(50, 50)
str.LuaString = "Select"
button:SetText(str)
button:SetWidth(100)
local function mycommandhandler(thecontrol)
if thecontrol:GetControlID() ==button:GetControlID() then
button:SetLeft(50)
button:SetTop(50)
end
end
dialog:RegisterHandleCommand(mycommandhandler)
dialog:CreateCancelButton()
dialog:ExecuteModal(nil)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20171025/92cbf52a/attachment.htm>
More information about the JWLua
mailing list