View Issue Details

IDProjectCategoryView StatusLast Update
0005174JEDI VCL00 JVCL Componentspublic2011-06-10 16:09
ReportertetarddAssigned ToAHUser 
Status resolvedResolutionfixed 
Product Version3.39 
Target VersionFixed in Version3.40 
Summary0005174: JvArrowButton: arrwo draw one pixel too much on the right
DescriptionIn themed app in Windows XP (not tried on other config.), the arrow is drawn one pixel too much on the right.

Place JvArrowButton on form.
Make sure it's themed.
Set ArrwoWidth to 15 or 16.
Do a screen capture and zoom arrow part of control.

The arrow touched the button border on the left but is 2 pixels away from right border. Should have 1 pixel gap on both side.

Proposed fix: Add +1 to the drawline's coordinated:

procedure TJvArrowButton.Paint;
{ Draw arrow }
  while PaintRect.Left < PaintRect.Right + 1 do
    DrawLine(Canvas, PaintRect.Left + 1, PaintRect.Bottom, PaintRect.Right + 1, PaintRect.Bottom);
    InflateRect(PaintRect, -1, 1);
TagsNo tags attached.



2010-03-09 11:05

administrator   ~0017272

Please provide the zipped sources of a sample application showing this.
Your proposed fix does not take into account the presence or absence of themes


2010-03-09 13:52

reporter   ~0017293

I will but you can try for yourself in double quick time.
Create a VCL form, add a JvArrowButton button and look at the screen.
Switch Theming on.

Note: if it's theme dependant, have a test for theme being enabled for the control and draw as you currently do without theming and as I suggest when themed.

2010-03-13 13:56


jvArrowButton.bmp (188,054 bytes)
jvArrowButton.bmp (188,054 bytes)

2010-03-13 13:58


jvArrowButton (Zoomed).bmp (167,670 bytes)
jvArrowButton (Zoomed).bmp (167,670 bytes)


2010-03-13 14:01

reporter   ~0017301

Attached are two screen captures (one zoomed for clarity).
From top to bottom:

1- Current jvArrowButton (themed) showing the arrow being drawn one pixel too much to the left.
2- My proposed fix (themed) showing the arrow now being perfectly centered.
3- My porposed fix (not themed) showing that my fix works from non-themed controls too.


2010-03-16 22:16

developer   ~0017305

Fixed in SVN.

Issue History

Date Modified Username Field Change
2010-02-20 09:57 tetardd New Issue
2010-03-09 11:05 obones Note Added: 0017272
2010-03-09 11:05 obones Status new => feedback
2010-03-09 13:52 tetardd Note Added: 0017293
2010-03-13 13:56 tetardd File Added: jvArrowButton.bmp
2010-03-13 13:58 tetardd File Added: jvArrowButton (Zoomed).bmp
2010-03-13 14:01 tetardd Note Added: 0017301
2010-03-16 22:16 AHUser Note Added: 0017305
2010-03-16 22:16 AHUser Status feedback => resolved
2010-03-16 22:16 AHUser Fixed in Version => Daily / SVN
2010-03-16 22:16 AHUser Resolution open => fixed
2010-03-16 22:16 AHUser Assigned To => AHUser
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40