View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005628||JEDI VCL||00 JVCL Components||public||2011-08-01 22:04||2012-09-10 14:15|
|Target Version||Fixed in Version||3.46|
|Summary||0005628: TJvDialButton not properly drawing ticks at runtime, works at designtime|
|Description||I'm using a TJvDialButton from JEDI and have a problem with it.|
I set TickStyle to tsAuto, Min to 0 and max to 1000. Frequency is set to 100,
MinAngle and MaxAngle are at their default values of 300 and 3300.
At designtime this all looks as I'd like it to look, at runtime I only get the first
two tick marks. The other ones are not painted. This is for 3 other such controls
the same, the only difference about them is a max of 2000 and a frequency of 200.
|Additional Information||I'm using Delphi XE and JEDI 3.40.|
jvdialbutton.jpg (44,171 bytes)
jvdialbutton.jpg (44,171 bytes)
||Please provide the zipped sources of a sample application showing this|
JediJvDialBug.zip (264,276 bytes)
||Provided a D2009 built minimalistic sample application now showing this behavior. I hope somebody finds the time to look at this now.|
||in Delphi XE2 it also shows only two ticks in design-time|
||but toggling TickStyle fixes this in designtime, strange :-)|
Reason is clear, how to fix is remains to be decided.
object JvDialButton1: TJvDialButton
Frequency = 100
Max = 1000
Min = -30
PointerSize = 40
Position = 500
Radius = 15
TickStyle = tsAuto
TabOrder = 0
1) Ticks positions are not updated when Min, Max or Angle are changed.
2) Frequency is set from DFM before Min/Max
3) TickStyle is set from constructor to the same value, so it becomes NOP when reading component from DFM
Look my second attach. Move trackbar up/down one tick after another - you'd see that ticks only adjusted on Freq change.
Proper thing to do would be reworking the component. It seems that when Min/Max/Freq/Angle would be changed in a row, it should postpone Tick re-calculation until required after last change.
So something like FTicksInvalid/NeedTicks() pair is to be used.
Quick fix though would probably be
procedure TJvCustomDialButton.SetParams(APosition, AMin, AMax: Integer);
// If redrawing flagged, cause a redraw, redoing the bitmap too.
if Invalid then
FBitmapInvalid := True;
Changed := True;
There also are methods like SetMaxAngle and properties like MinAngle - i did not checked if they can corrupt Ticks similar way. Above is quick dirty fix for topicstarter problem.
PS: I would also say, that Angles are measured in deci-degrees (3600 for ffull circle) - and that SHOULD be documented, otherwise it is confusing to see angles like 1843 - and what does this mean ?
JediJvDialBug_QuickDirtyFix.zip (1,738,491 bytes)
||This is now fixed in SVN|
|2011-08-01 22:04||mh||New Issue|
|2011-08-06 14:49||mh||File Added: jvdialbutton.jpg|
|2011-09-21 11:59||obones||Note Added: 0018941|
|2011-09-21 11:59||obones||Status||new => feedback|
|2011-09-21 14:24||mh||File Added: JediJvDialBug.zip|
|2011-09-21 14:26||mh||Note Added: 0018956|
|2011-09-21 14:27||mh||Tag Attached: JVCL|
|2011-09-21 14:27||mh||Tag Attached: TJvDialButton|
|2011-09-21 14:49||obones||Note Added: 0018963|
|2011-09-21 14:49||obones||Status||feedback => acknowledged|
|2011-09-30 14:24||Arioch||Note Added: 0018993|
|2011-09-30 14:26||Arioch||Note Added: 0018994|
|2011-09-30 14:40||Arioch||File Added: JediJvDialBug_TS.zip|
|2011-09-30 15:42||Arioch||Note Added: 0018995|
|2011-09-30 15:42||Arioch||File Added: JediJvDialBug_QuickDirtyFix.zip|
|2011-09-30 15:43||Arioch||File Deleted: JediJvDialBug_TS.zip|
|2011-10-02 15:29||Arioch||Note Edited: 0018995|
|2012-02-23 13:47||obones||Note Added: 0019517|
|2012-02-23 13:47||obones||Status||acknowledged => resolved|
|2012-02-23 13:47||obones||Fixed in Version||=> Daily / SVN|
|2012-02-23 13:47||obones||Resolution||open => fixed|
|2012-02-23 13:47||obones||Assigned To||=> obones|
|2012-09-10 14:15||obones||Fixed in Version||Daily / SVN => 3.46|