From: <ob...@us...> - 2013-01-15 14:41:15
|
Revision: 13490 http://jvcl.svn.sourceforge.net/jvcl/?rev=13490&view=rev Author: obones Date: 2013-01-15 14:41:08 +0000 (Tue, 15 Jan 2013) Log Message: ----------- Mantis 5985: Must use desktop size for combo boxes to show properly Modified Paths: -------------- trunk/jvcl/run/JvInspector.pas Modified: trunk/jvcl/run/JvInspector.pas =================================================================== --- trunk/jvcl/run/JvInspector.pas 2013-01-15 14:20:16 UTC (rev 13489) +++ trunk/jvcl/run/JvInspector.pas 2013-01-15 14:41:08 UTC (rev 13490) @@ -5657,9 +5657,9 @@ if ListCount = 0 then ListCount := 1; TListBox(ListBox).Height := ListCount * TListBox(ListBox).ItemHeight + 4; - if ListBox.Height > Screen.Height then + if ListBox.Height > Screen.DesktopHeight then begin - ListCount := (Screen.Height - 4) div TListBox(ListBox).ItemHeight; + ListCount := (Screen.DesktopHeight - 4) div TListBox(ListBox).ItemHeight; TListBox(ListBox).Height := ListCount * TListBox(ListBox).ItemHeight + 4; end; ListBox.ItemIndex := ListBox.Items.IndexOf(EditCtrl.Text); @@ -5677,16 +5677,16 @@ if ListBox.Items.Count > ListCount then Inc(J, GetSystemMetrics(SM_CXVSCROLL)); ListBox.ClientWidth := J; - if ListBox.Width > Screen.Width then - ListBox.Width := Screen.Width; + if ListBox.Width > Screen.DesktopWidth then + ListBox.Width := Screen.DesktopWidth; P := Inspector.ClientToScreen(Point(Rects[iprValueArea].Right - ListBox.Width, EditCtrl.Top)); if P.X < 0 then P := Inspector.ClientToScreen(Point(Rects[iprValueArea].Left, EditCtrl.Top)); Y := P.Y + RectHeight(Rects[iprValueArea]); - if Y + ListBox.Height > Screen.Height then + if Y + ListBox.Height > Screen.DesktopHeight then Y := P.Y - TListBox(ListBox).Height; - if P.X + ListBox.Width > Screen.Width then - P.X := Screen.Width - ListBox.Width; + if P.X + ListBox.Width > Screen.DesktopWidth then + P.X := Screen.DesktopWidth - ListBox.Width; SetWindowPos(ListBox.Handle, HWND_TOP, P.X, Y, 0, 0, SWP_NOSIZE or {SWP_NOACTIVATE or }SWP_SHOWWINDOW); InvalidateItem; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |