View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005311 | JEDI VCL | 00 JVCL Components | public | 2010-08-26 10:01 | 2012-02-29 16:53 |
| Reporter | ralfiii | Assigned To | obones | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.39 | ||||
| Target Version | Fixed in Version | 3.45 | |||
| Summary | 0005311: Height can't be set below 21 for TJvDateEdit/TJvComboEdit/TJvMaskEdit | ||||
| Description | When the borderstyle of one of TJvComboEdit is set to bsNone it should generally be possible to make the component (in the IDE) smaller. The original VCL-MaskEdit can even be made as small as you like no matter which borderstyle. All the Jedi-components mentioned above can't be made smaller (On my screen they always stay at a minimum of 21 pixels). In TJvCustomComboEdit there's even code that checks for that (GetMinHeight), but it seems to be overruled somewhere. | ||||
| Tags | No tags attached. | ||||
|
|
The problem was located in TJvCustomComboEdit.AdjustHeight - BorderStyle was ignored. Patch attached. |
|
2010-08-26 10:02
|
JvCustomComboEdit_SetHeight.patch (912 bytes)
Index: JvToolEdit.pas
===================================================================
--- JvToolEdit.pas (revision 14418)
+++ JvToolEdit.pas (working copy)
@@ -1708,17 +1708,25 @@
I: Integer;
SysMetrics, Metrics: TTextMetric;
begin
+ // Get text height
DC := GetDC(HWND_DESKTOP);
GetTextMetrics(DC, SysMetrics);
SaveFont := SelectObject(DC, Font.Handle);
GetTextMetrics(DC, Metrics);
SelectObject(DC, SaveFont);
ReleaseDC(HWND_DESKTOP, DC);
- if not Flat then
- I := 8
- else
- I := 6;
- I := GetSystemMetrics(SM_CYBORDER) * I;
+
+ // if necessary reserve space for border
+ i:=0;
+ if BorderStyle<>bsNone then
+ begin
+ if not Flat then
+ I := 8
+ else
+ I := 6;
+ I := GetSystemMetrics(SM_CYBORDER) * I;
+ end;
+
if Height < Metrics.tmHeight + I then
Height := Metrics.tmHeight + I;
end;
|
|
|
Thanks, this is now in SVN |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-08-26 10:01 | ralfiii | New Issue | |
| 2010-08-26 10:02 | ralfiii | Note Added: 0017628 | |
| 2010-08-26 10:02 | ralfiii | File Added: JvCustomComboEdit_SetHeight.patch | |
| 2010-10-11 09:59 | obones | Note Added: 0017859 | |
| 2010-10-11 09:59 | obones | Status | new => resolved |
| 2010-10-11 09:59 | obones | Fixed in Version | => Daily / SVN |
| 2010-10-11 09:59 | obones | Resolution | open => fixed |
| 2010-10-11 09:59 | obones | Assigned To | => obones |
| 2012-02-29 16:53 | obones | Fixed in Version | Daily / SVN => 3.45 |