Page 1 of 1

Lock ComboBox but enable mouse scroll

Posted: Tue Jan 02, 2018 4:07 pm
by zgdzgdzgd
Hello,

i want to lock the combobox so user can't change text inside, but i when i lock it the scroling with mouse doesn't work anymore :/

This is my code:

Code: Select all

on rawKeyDown theKeyNumber
  if theKeyNumber is 65308 then answer down  -- mouse wheel down
  else if theKeyNumber is 65309 then answer up  -- mouse wheel up
  else ## -- locks combobox
  end if
end rawKeyDown

Re: Lock ComboBox but enable mouse scroll

Posted: Tue Jan 02, 2018 4:17 pm
by FourthWorld
An option control does that.

Re: Lock ComboBox but enable mouse scroll

Posted: Tue Jan 02, 2018 4:25 pm
by zgdzgdzgd
Nevermind i think i got it:

Code: Select all

on rawKeyDown theKeyNumber
  if theKeyNumber is 65308 then pass rawKeyDown -- mouse wheel down (65308 key reiškia pelės ratukas žemyn)
  else if theKeyNumber is 65309 then pass rawKeyDown -- mouse wheel up (65309 key reiškia pelės ratukas aukštyn)
  else ## -- lock combobox text
  end if
end rawKeyDown
on rawkeyup
   ##
   end rawkeyup