[JW Lua] RegisterHandleUpDownPressed

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Sun Dec 20 10:33:07 CET 2015


Chris,

I've changed that now for the next beta. It was an issue on Windows.

However, my question is why you want to do this? Normally, if you have 
connected the up/down control to an edit control, you should monitor the 
(HandleCommand) events for the edit control instead. That will monitor 
both the up/downs and the changes made by user with the keyboard.

Also, avoid to set the height for single-line controls, since that will 
not work with the cross-platform compatibility.


Best regards,

Jari Williamsson


On 2015-12-19 15:12, Chris wrote:
> Jari
>
> RegisterHandleUpDownPressed is not working.
> What I forgot ?
>
> ------------------------------
> local function createUpDown(dialog,x,y,minValue,maxValue,defautValue)
>     -- FCCtrlEdit
>      local ce = dialog:CreateEdit(x,y)
>      ce:SetWidth(15)
>      ce:SetHeight(15)
>
>      -- FCCtrlUpDown
>      local upDown = dialog:CreateUpDown(x + 15,y)
>      upDown:ConnectIntegerEdit(ce,minValue,maxValue)
>      upDown:SetValue(defautValue)
>
>      return ce,upDown
> end
>
> local function callbackUpDown(ctrl,delta)
>      print("delta :",delta)
> end
>
> local cw = finale.FCCustomLuaWindow()
> cw:CreateOkButton()
> cw:CreateCancelButton()
> local ce,upDown = createUpDown(cw,0,0,1,10,1)
>
> cw:RegisterHandleUpDownPressed(callbackUpDown)
>
> local ret = cw:ExecuteModal(nil)
> ------------------------------
>
>
> Best regards
>
> Chris
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>






More information about the JWLua mailing list