View Issue Details

IDProjectCategoryView StatusLast Update
0006736JEDI VCL00 JVCL Componentspublic2023-11-11 15:49
Reporteru666saAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityrandom
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in VersionDaily / GIT 
Summary0006736: TJvOfficeColorButton, color panel is initially showed at wrong coordinates
DescriptionOn 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 ReproduceWasn't able to reproduce it.
TagsNo tags attached.

Activities

u666sa

2022-01-08 17:11

reporter   ~0022019

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!!

AHUser

2023-11-11 15:49

developer   ~0022046

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.

Issue History

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