View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006736 | JEDI VCL | 00 JVCL Components | public | 2022-01-08 14:46 | 2023-11-11 15:49 |
Reporter | u666sa | Assigned To | AHUser | ||
Priority | normal | Severity | major | Reproducibility | random |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | Daily / GIT | |||
Summary | 0006736: TJvOfficeColorButton, color panel is initially showed at wrong coordinates | ||||
Description | On my project, I decided to use TJvOfficeColorButton and to my horrific discovery, at first run, color panel shows at screen coordinates 0,0 -- picture - https://ibb.co/WnSm1D2 -- in other words, not under the color button but at top left of monitor... That's when you click it 1st time. you click it again and it is displayed where needed.. Now, I tried creating new project and adding TJvOfficeColorButton and it works perfectly... So I have no idea how to reproduce it.. Nor I have any idea how to fix my project so I can use this component. This happens not only on main form in the project, but also on all other forms. So even if I create a new form in the project, this behaviour persists!!!! But.... If I create a new project and drop this button the form, it works... | ||||
Steps To Reproduce | Wasn't able to reproduce it. | ||||
Tags | No tags attached. | ||||
|
Okey!! I figured out how this problem happens, so it can be reproduced by anyone!!!!! TJvOfficeColorButton is having the above said problem when you load style from file and then set it. In other words, if inside your form constructor there is TStyleManager::LoadFromFile("c:\\styles\\my_fancy_style.vsf"); TStyleManager::TrySetStyle("MyFancyStyle", false); then when your form loads and you click on TJvOfficeColorButton it will show the color panel at top=0 left=0 on your screen..... However, if you set your style at design time, this problem does not happen. This is a bug, gentelmen!! |
|
Fix in git main branch. The StyleManager caused the ColorForm's WindowHandle to be recreated. This discarded the calculated Left/Top coordinates because the form's Position property was poDefaultPosOnly. |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-01-08 14:46 | u666sa | New Issue | |
2022-01-08 17:11 | u666sa | Note Added: 0022019 | |
2023-11-11 15:49 | AHUser | Assigned To | => AHUser |
2023-11-11 15:49 | AHUser | Status | new => resolved |
2023-11-11 15:49 | AHUser | Resolution | open => fixed |
2023-11-11 15:49 | AHUser | Fixed in Version | => Daily / GIT |
2023-11-11 15:49 | AHUser | Note Added: 0022046 |