View Issue Details

IDProjectCategoryView StatusLast Update
0005891JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
Reporterthomasg_76Assigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.49 
Summary0005891: JvColorBotton shows JvColorForm off screen or behind the windows task bar
DescriptionIf a JvColorBotton is placed very near the window task bar or very close to the bottom of the screen (workable area) then the JvColorForm is drawn partially outside an area the user can click.
The user then to circumvent the situation by resizing the application so that the form can be fully shown.
Additional InformationI changed the the code in JvColorForm to account for this. I attach the diff generated from SVN so that you can look if the patch will work.
TagsNo tags attached.

Activities

2012-05-31 15:01

 

JvColorForm.pas.diff (1,016 bytes)
Index: JvColorForm.pas
===================================================================
--- JvColorForm.pas	(revision 13302)
+++ JvColorForm.pas	(working copy)
@@ -186,9 +186,6 @@
 end;
 
 
-
-
-
 procedure TJvColorForm.DoColorClick(Sender: TObject);
 begin
   if Sender is TJvColorSquare then
@@ -224,6 +221,7 @@
 procedure TJvColorForm.FormActivate(Sender: TObject);
 var
   R: TRect;
+  Boundary : TRect;
   Pt: TPoint;
 begin
   { set placement }
@@ -231,10 +229,18 @@
   begin
     R := FOwner.ClientRect;
     Pt.X := R.Left;
-    Pt.Y := R.Top + R.Bottom;
+    Pt.Y := R.Bottom;
     Pt := FOwner.ClientToScreen(Pt);
+    Boundary := Screen.MonitorFromPoint(Pt).WorkareaRect;
+
     Left := Pt.X;
+    if (Left + Width) > Boundary.Right then
+      Left := Boundary.Right - Width;
+
     Top := Pt.Y;
+    if (Top + Height) > Boundary.Bottom then
+      Top := Pt.Y - Height - (R.Bottom - R.Top);
+
     if FOwner is TJvColorButton then
       SelectedColor := TJvColorButton(FOwner).Color;
   end;
JvColorForm.pas.diff (1,016 bytes)

obones

2012-06-11 17:35

administrator   ~0019870

Please use the latest SVN version and provide the zipped sources of a sample application showing this.

2012-06-29 01:23

 

2012-06-29 01:24

 

2012-06-29 01:25

 

TJvColorButton-Bug.zip (17,784 bytes)

thomasg_76

2012-06-29 01:27

reporter   ~0020042

The source is not too much a help, so I put 2 screen shots up, showing the current behavior from the SVN code, and the behavior a user would expect (my fix in the diff file).

The issue is really if for some reason the TJvColorButton is near the bottom of the screen, as shown in my screen shots.

By the way the TJvOfficeColorButton has the correct behavior.

obones

2013-12-13 16:20

administrator   ~0020835

This is now in GIT

Issue History

Date Modified Username Field Change
2012-05-31 15:01 thomasg_76 New Issue
2012-05-31 15:01 thomasg_76 File Added: JvColorForm.pas.diff
2012-06-11 17:35 obones Note Added: 0019870
2012-06-11 17:35 obones Status new => feedback
2012-06-29 01:23 thomasg_76 File Added: TJvColorButton-Current.jpg
2012-06-29 01:24 thomasg_76 File Added: TJvColorButton-Expected.jpg
2012-06-29 01:25 thomasg_76 File Added: TJvColorButton-Bug.zip
2012-06-29 01:27 thomasg_76 Note Added: 0020042
2013-12-13 11:34 obones Status feedback => acknowledged
2013-12-13 16:20 obones Note Added: 0020835
2013-12-13 16:20 obones Status acknowledged => resolved
2013-12-13 16:20 obones Fixed in Version => Daily / GIT
2013-12-13 16:20 obones Resolution open => fixed
2013-12-13 16:20 obones Assigned To => obones
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49