ComboBox not working properly when its parent is a panel

ComboBox not working properly when its parent is a panel



I am wondering if this is a bug, or there is something simple I am missing and it is as designed. When I drop a combobox on a form, it works fine when it has several items populating it. However, as soon as I drop the combobox into a panel (as its parent) it no longer works properly.



When I click it to drop down the items, it does not function correct, AFAICT: it shows the items, but it does not select/highlight an item when you hover over it, and the scroll bars don't respond. I can get it to work by fiddling around with the size of it (adding a splitter and resizing the panel) but it is hit and miss.



Steps to reproduce:



It does respond to a click, but does not hover highlight the item you are over, and scroll bars don't respond to click.



This is on MS Windows, Delphi Tokyo. Have not tried on MacOS.



EDIT: actually, now it does not seem to work correct on a regular form (no panel) too. Seems to be intermittent, or I don't understand the issue fully.






I don't have Tokyo installed, but when testing in Berlin I cannot reproduce the problem. So, to check if your issue is related to your project or to the IDE, shut down your project and the IDE. Restart the IDE and try in a fresh project. Btw, I recall there was some updates to Tokyo, have you installed them?

– Tom Brunberg
Jul 20 '17 at 6:12






It all works fine in Seattle. Restarting IDE does not help... Berlin/Tokyo affected, Seattle works fine. I'll see if I can install any updates...

– Another Prog
Jul 20 '17 at 13:46






As I said, in Berlin I cannot reproduce the problem, while you say the problem affects Berlin and Tokyo. If you restarted the IDE and tried with a new project, there must be something in your environment. For me the scrollbar works as expected, hovering the mouse over the list moves the selection, clicking on an item, closes the dropdown.

– Tom Brunberg
Jul 20 '17 at 14:32






What operating system are you using? It does work some of the time, so I cannot always reproduce. I am using Windows 7 64 Bit

– Another Prog
Jul 22 '17 at 14:50







I have also Win 7 but 32 bit. I did all tests in the debugger.

– Tom Brunberg
Jul 22 '17 at 16:15




1 Answer
1



I found the same problem under Rad Studio Tokyo 10.2. Try applying an even number to the width of the TComboBox (ex: if it's 145, try with 140). There seems to be a problem combining rendering, scaling and rounding.






I have seen that odd number issue elsewhere before in other software on Windows, I will try it and accept answer if it works, and someone should report the fix to Embarcadero bug reporting if it is a solution!

– Another Prog
Nov 6 '17 at 1:22






I tried making the width an even number and the problem still persists. The demo project was uploaded to Embarcadero bug reporting. The bug report ID's are RSP-18636 and RSP-18635 with a demo example included

– Another Prog
Nov 13 '17 at 7:19




Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ