WizardForm / ComponentList hooking cursor keys

102 views
Skip to first unread message

Merijn Bosma

unread,
Mar 25, 2021, 5:19:31 PM3/25/21
to innosetup
Hey all,

I'm working on building a replacement for the ComponentList with extended features. Since I don't want to make changes to Inno itself, I'm building something in a DLL, which will put a 'new' ComponentList over the existing one.

Things are going quite well, but what I notice is that when cursor keys are pressed (VK_UP, VK_DOWN, VK_LEFT or VK_RIGHT) while 'my' ComponentList has focus, the keypresses never end up in my component the focus is taken away from my component. Keys like VK_HOME, VK_END, VK_PRIOR (pageup) and VK_NEXT (pagedown) are working as expected.

Does anyone know how this happens and how to avoid it? While digging through Inno code I found the messagehandler TNewCheckListBox.WMKeyDown(var Message: TWMKeyDown) in NewCheckListBox.pas which seems to do something similar, but quite in the top of that method it says:

  { If space is pressed, avoid flickering -- exit now. }
  if not FWantTabs or (Message.CharCode = VK_SPACE) then
  begin
    inherited;
    Exit;
  end;

When I set WantTabs for  the ComponentsList to false I'd expect the method to exit, but that doesn't help.

Thanks in advance!

Alex Born

unread,
Mar 26, 2021, 6:36:45 AM3/26/21
to innosetup
Why don't you want to add extended features to the official version of the TNewCheckListBox component for Inno Setup?
Why create a plugin when you can do it right in the source code Inno?
Make your proposal to the developer, discuss the details and implement.

For example, the component TNewCheckListBox sorely lacks the function of collapsing and expanding nodes. There is no way to use your own textures (images BMP, Jpg, Png) for checkboxes and radioboxes. You cannot change the background or make it transparent. All these features are in the Graphical Installer plugin, but it is paid! Now you are making another plugin (paid?). Better develop and improve the official version of Inno Setup.

There are many different free plugins now, but they are outdated a long time ago, are no longer supported by developers and do not work with the Inno Setup 6. For this reason, most users still use Inno Setup 5. What happens if you stop supporting your plugin? Inno Setup will go further and your plugin will be a thing of the past.

Kindly regards. :)

Merijn Bosma

unread,
Mar 27, 2021, 12:02:04 PM3/27/21
to innosetup
Adding features to TNewCheckListBox is quite some more work then making a plugin which does exactly what I need. I don't have the intention of making this paid, or to add features for general use.
My approach is quite different then what currently is there as TNewCheckListBox, so adding it Inno itself won't be that easy.
Reply all
Reply to author
Forward
0 new messages