Small bug with the NxComboBox scrollbar in the latest preview release.
I have a NxComboBox with 10 entries and a DropDown count of 20. With the latest preview version a scrollbar is displayed, but the size of the drop down is sized correctly for 10 entries. The latest official version doesn't display this scrollbar.
I think the culprit is in NxPopupControl.pas where you introduced the following line in "TNxPopupList.Popup":
VertScrollBar.Visible := Items.Count > DropDownCount;
DropDownCount is 8 instead of 20 in that case.
Scrollbar style
Started by Dmitry, May 25 2007 02:26 PM
43 replies to this topic
#41
Posted 31 July 2008 - 07:03 PM
#42
Posted 31 July 2008 - 08:00 PM
Start attached demo and popup the scroll down list...
DropDownCount is 20, but in TNxPopupList.Popup the DropDownCount is 8, that's why the scrollbar is displayed.
DropDownCount is 20, but in TNxPopupList.Popup the DropDownCount is 8, that's why the scrollbar is displayed.
Attached Files
#43
Posted 31 July 2008 - 08:07 PM
Hello Aim,
Please try to replace next line (NxEdit.pas):
regards
Please try to replace next line (NxEdit.pas):
CODE
procedure TNxComboBox.BeforeDrop(var APoint: TPoint);
begin
with FPopupControl as TNxPopupList do
begin
DropDownColor := FDropDownColor;
DropDownCount := FDropDownCount; // <----------------- new line
HighlightTextColor := FHighlightTextColor;
DisplayMode := FDisplayMode;
Items := FItems;
Images := FImages;
ItemHeight := Self.ItemHeight;
ItemIndex := Self.ItemIndex;
ShowImages := Images <> nil;
SelectionColor := Self.SelectionColor;
if FListWidth > 0 then Width := FListWidth else Width := Self.Width;
if Width < Self.Width then Width := Self.Width;
if Items.Count <= Self.DropDownCount then ClientHeight := Items.Count * Self.ItemHeight
else ClientHeight := Self.DropDownCount * Self.ItemHeight;
ClientHeight := ClientHeight + 4;
end;
end;
begin
with FPopupControl as TNxPopupList do
begin
DropDownColor := FDropDownColor;
DropDownCount := FDropDownCount; // <----------------- new line
HighlightTextColor := FHighlightTextColor;
DisplayMode := FDisplayMode;
Items := FItems;
Images := FImages;
ItemHeight := Self.ItemHeight;
ItemIndex := Self.ItemIndex;
ShowImages := Images <> nil;
SelectionColor := Self.SelectionColor;
if FListWidth > 0 then Width := FListWidth else Width := Self.Width;
if Width < Self.Width then Width := Self.Width;
if Items.Count <= Self.DropDownCount then ClientHeight := Items.Count * Self.ItemHeight
else ClientHeight := Self.DropDownCount * Self.ItemHeight;
ClientHeight := ClientHeight + 4;
end;
end;
regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#44
Posted 31 July 2008 - 08:11 PM
Thanks, adding that line fixes that behavior...
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users