View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001544 | JEDI VCL | 00 JVCL Components | public | 2004-03-29 08:29 | 2004-03-30 02:10 |
Reporter | Markus Spoettl | Assigned To | marcelb | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001544: JvInspector: Dragging the devider beyond the control's right edge error | ||||
Description | If you drag the devider beyond the right edge the devider suddenly appears at the left edge. If you further move right the move (which still holding the left button) the devider moves to the right as well, until it reaches the edge of the control where it wraps again. The problem is the linke "XB := X mod BWidth", the using the mod function here is questionable. I've added a fix in my local version by removing the mod, see additional information. | ||||
Additional Information | procedure TJvCustomInspector.MouseMove(Shift: TShiftState; X, Y: Integer); [...] begin BWidth := ClientWidth; BandIdx := -1; end; // FIX BEGIN if (X >= BWidth) then X := BWidth; XB := X; // mod BWidth; // FIX END XB := X mod BWidth; if DraggingDivider then [...] | ||||
Tags | No tags attached. | ||||
|
Yes, but now it will probably have some problems with UseBands = True. |
|
Works fine in my test program using bands. Markus |
|
Ok, I have to correct that. My fix works only if using the devider in the first band, not if you use deviders in the bands to the right. Markus |
|
I have a partial solution, but the behavior you mentioned will still apply when using bands (the divider will move back to the left in band mode only). Current fix: begin BWidth := ClientWidth; BandIdx := -1; end; // FIX BEGIN if UseBands then XB := X mod BWidth else XB := X; // FIX END Will now look into the bands, because it should work exactly the same there. Will report back later. |
|
Fixed and tested in both band and non-band mode. Things you'll need to change: -add a private field to TJvCustomInspector: FDividerDragBandX: Integer; -add a protected property to TJvCustomInspector: property DividerDragBandX: Integer read FDividerDragBandX write FDividerDragBandX; - change TJvCustomInspector.MouseDown: [...] // Check divider dragging if (XB >= Pred(DividerAbs)) and (XB <= Succ(DividerAbs)) then begin DraggingDivider := True; DividerDragBandX := BandIdx * BWidth; end // Check row sizing [...] - change TJvCustomInspector.MouseMove: [...] BandIdx := -1; end; if UseBands and not DraggingDivider then XB := X mod BWidth else if UseBands and DraggingDivider then XB := X - DividerDragBandX else XB := X; if DraggingDivider then DividerAbs := XB [...] Now it should work properly in all cases. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-03-29 08:29 | Markus Spoettl | New Issue | |
2004-03-29 23:58 | marcelb | Note Added: 0003504 | |
2004-03-29 23:58 | marcelb | Status | new => confirmed |
2004-03-30 00:32 | anonymous | Note Added: 0003505 | |
2004-03-30 00:52 | anonymous | Note Added: 0003506 | |
2004-03-30 00:57 | marcelb | Status | confirmed => assigned |
2004-03-30 00:57 | marcelb | Assigned To | => marcelb |
2004-03-30 01:02 | marcelb | Note Added: 0003508 | |
2004-03-30 02:10 | marcelb | Status | assigned => resolved |
2004-03-30 02:10 | marcelb | Resolution | open => fixed |
2004-03-30 02:10 | marcelb | Note Added: 0003509 |