Recent

Author Topic: Can't show horizontalscrollbar in a list box in PDA built(in windows ok)  (Read 6282 times)

donnie

  • Jr. Member
  • **
  • Posts: 72
Hi there,
I have made a procedure that adds a horizontal scroll bar in a list box(according to the maximum string in the list).But when I build it for my PDA it doesn't show anything.In windows everything is ok...
Here is the code...
Code: [Select]
procedure Tform1.SetHorizontalScrollBar(lb : TListBox) ;
var
  j, MaxWidth: integer;
begin
  MaxWidth := 0;
  for j := 0 to lb.Items.Count - 1 do
  if MaxWidth < lb.Canvas.TextWidth(lb.Items[j]) then
    MaxWidth := lb.Canvas.TextWidth(lb.Items[j]) ;

  SendMessage(lb.Handle,
              LB_SETHORIZONTALEXTENT,
              MaxWidth + GetSystemMetrics(SM_CXFRAME), 0) ;
end;

What does it need to show it at PDAs as well?

 

TinyPortal © 2005-2018