How can I display a Listbox beyond the borders of the parent Form at runtime:
The image is obtained from the IDE when clicking on the listbox in design time. I would like to achieve this effect at runtime.
How can I display a Listbox beyond the borders of the parent Form at runtime:
The image is obtained from the IDE when clicking on the listbox in design time. I would like to achieve this effect at runtime.
Copyright © 2021 Jogjafile Inc.

You can not really visually extend the control outside of the parent form. But you can achieve the effect by creating a separate borderless form for this control and display this secondary form partly over the first form:
Here
Form1is a main form, with followingOnClickhandler forButton1:Since the second form (
Form2) is not related (child - parent wise) toForm1we must give its location as screen pixels, but still relative toForm1. Therefore we use theForm1.ClientOrigin(`Form1 client area top and left as screen coordinates) as reference.The second form,
Form2that holds theTListBox, has following property settingsand it has the
OnKeyUpevent handler written as