Recent

Author Topic: kolscrollbox nat scroll  (Read 4352 times)

burakb44

  • New member
  • *
  • Posts: 8
kolscrollbox nat scroll
« on: June 21, 2012, 08:06:37 am »
hello

the form's OnCreate event, I create my button. kolscrollbox give the buttons is created as a parent. consists of buttons, but the vertical scroll does not work? due cause? Do you have the idea that


Ekran = TKolScrollBox


procedure TForm3.KOLForm3FormCreate(Sender: PObj);
var
NesneNo,MLeft,MTop,Mwidth  : Integer;
K_Sayisi,I :  Integer;
M : TKolButton;
Dosya: TextFile;
IlkSatir : String;
begin
  Liste.Clear;
  Assignfile(Dosya,'MasaListesi.txt');
  Reset(Dosya);
  K_Sayisi := 0;
  Readln(Dosya,IlkSatir);
  IlkSatir := Trim(IlkSatir);

  K_Sayisi := Str2Int(IlkSatir);

  For I := 1 To K_Sayisi do
    Begin
      IlkSatir := '';
      Readln(Dosya,IlkSatir);
      IlkSatir := Trim(IlkSatir);
      Liste.Add(IlkSatir+#13#10);
    End;
  CloseFile(Dosya);

  MTop     := 1;
  MLeft    := 1;
  MWidth   := 65;
  NesneNo  := 1;

  For I := 1 To K_Sayisi Do
    Begin

      M         := NewButton(Ekran,UTF8Decode('M_'+Liste.items[I-1]+int2str(NesneNo)));
      M.Caption := 'M_'+Liste.items[I-1];
      M.Parent := Ekran;
      M.Left    := MLeft;
      M.Top     := MTop;
      M.Height  := 25;
      M.Width   := MWidth;
      M.OnClick := MasaKlik;
      M.Show;

      NesneNo   := NesneNo + 1;
      MLeft     := MLeft + MWidth;
      if (MLeft+MWidth) > Ekran.Width then
        Begin
          MLeft := 2;
          MTop  := MTop + 27;
        End;
    End;

end; 

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: kolscrollbox nat scroll
« Reply #1 on: July 12, 2012, 11:31:22 pm »
I'm not a machine with KOL installed, but does the kollscrollbox have a Range property you can set.?

 

TinyPortal © 2005-2018