I think when you are talking about de LoNoHideScroll, right?
But wether i put yes or no, scrollbar always appears.
I've looked at source code and testing i managed to hide the scroll bar if i removed WS_VSCROLL from the newlistbox function. Of course it will now never show no matter what i put in Lonohidescroll.
function NewListbox( AParent: PControl; Options: TListOptions ): PControl;
var Flags: Integer;
begin
Flags := MakeFlags( @Options, ListFlags );
Result := _NewControl( AParent, 'LISTBOX', WS_VISIBLE or WS_CHILD or WS_TABSTOP
or WS_BORDER or WS_VSCROLL
or LBS_NOTIFY or Flags , True, @ListActions );
with Result.fBoundsRect do
begin
Right := Right + 100;
Bottom := Top + 200;
end;
Result.fColor := clWindow;
Result.fLookTabKeys := [ tkTab, tkLeftRight ];
end;
Is this because SetWindowLong doesn't allows to change WS_VSCROLL property after window has been created?
Using the following code still shows the scrollbar :
procedure TForm1.ListBox1Show(Sender: PObj);
var
style : integer;
begin
style := GetWindowLong(listbox1.handle, GWL_STYLE) xor WS_VSCROLL;
SetwindowLong(Listbox1.Handle,GWL_STYLE, style );
SetWindowPos(Listbox1.handle, Listbox1.handle,Listbox1.left, listbox1.Top, listbox1.Width, listbox1.height,SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER or SWP_FRAMECHANGED);
end;