View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002723 | JEDI VCL | 00 JVCL Components | public | 2005-03-07 07:13 | 2006-04-07 07:37 |
Reporter | marcgeldon | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.10 | ||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0002723: TJvDBLookupTreeViewCombo does not paint correctly | ||||
Description | Hello! Just let me explain how I find the "error". We "highlight" the focused component with a special color in our apps. For example: on the "OnEnter" event we set the highlight color, on the "OnExit" event we set the normal color. After we set the color back to normal color, there was a 1 pixel border in the component with the old highlight color. For this, I wrote a bug fix. You have to "fill" the component with the new color. Best wishes from Germany, Marc Geldon (PRO IT SYSTEMS -> www.proitsystems.de) | ||||
Additional Information | +++ NEW PAINT PROCEDURE +++ procedure TJvDBLookupTreeViewCombo.Paint; var W, X, Flags: Integer; Text: string; Alignment: TAlignment; Selected: Boolean; R: TRect; begin Canvas.Font := Font; Canvas.Brush.Color := Color; Selected := FFocused and not FListVisible and not (csPaintCopy in ControlState); if Selected then begin Canvas.Font.Color := clHighlightText; Canvas.Brush.Color := clHighlight; end; if (csPaintCopy in ControlState) and (FDataField <> nil) then begin Text := FDataField.DisplayText; Alignment := FDataField.Alignment; end else begin Text := FText; Alignment := FAlignment; end; W := ClientWidth - FButtonWidth; X := 2; case Alignment of taRightJustify: X := W - Canvas.TextWidth(Text) - 3; taCenter: X := (W - Canvas.TextWidth(Text)) div 2; end; // fill the component with the new color! SetRect(R, 0, 0, W, ClientHeight); Canvas.FillRect(R); SetRect(R, 1, 1, W - 1, ClientHeight - 1); Canvas.TextRect(R, X, 2, Text); if Selected then Canvas.DrawFocusRect(R); SetRect(R, W, 0, ClientWidth, ClientHeight); if not FListActive then Flags := DFCS_SCROLLCOMBOBOX or DFCS_INACTIVE else if FPressed then Flags := DFCS_SCROLLCOMBOBOX or DFCS_FLAT or DFCS_PUSHED else Flags := DFCS_SCROLLCOMBOBOX; DrawFrameControl(Canvas.Handle, R, DFC_SCROLL, Flags); end; | ||||
Tags | No tags attached. | ||||
2005-03-07 07:13
|
JvDBLookupTreeView.pas (47,920 bytes) |
|
Can someone merge this with the current version of TJvDBLookupTreeViewCombo.Paint and add it to CVS? |
|
This is now in CVS. Sorry for the delay, but as you have seen, there is a huge backlog of issues, and not many time for us to look at them. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-03-07 07:13 | marcgeldon | New Issue | |
2005-03-07 07:13 | marcgeldon | File Added: JvDBLookupTreeView.pas | |
2006-03-21 06:47 | marcgeldon | Note Added: 0008710 | |
2006-04-07 07:37 | obones | Status | new => resolved |
2006-04-07 07:37 | obones | Resolution | open => fixed |
2006-04-07 07:37 | obones | Assigned To | => obones |
2006-04-07 07:37 | obones | Note Added: 0009033 |