home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- //Borland C++Builder
- //Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
- //----------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
-
- #include "main.h"
- #include <stdlib.h>
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::ScrollBar1Scroll(TObject *Sender,
- TScrollCode ScrollCode, int &ScrollPos)
- {
- char buf[5];
- PosEdit->Text = itoa(ScrollBar1->Position, buf, 10);
- switch (ScrollCode)
- {
- case scLineUp:
- Label2->Caption = "U₧ivatel kliknul na hornφ nebo levou Üipku posuvnφku nebo stiskl klßvesu Üipky nahoru.";
- break;
- case scLineDown:
- Label2->Caption = "U₧ivatel kliknul na spodnφ nebo pravou Üipku posuvnφku nebo stiskl klßvesu Üipky dol∙.";
- break;
- case scPageUp:
- Label2->Caption = "U₧ivatel kliknul na posuvnφk vlevo od madla nebo stiskl klßvesu PgUp.";
- break;
- case scPageDown:
- Label2->Caption = "U₧ivatel kliknul na posuvnφk vpravo od madla nebo stiskl klßvesu PgDn.";
- break;
- case scPosition:
- Label2->Caption = "User positioned the thumb tab and released it.";
- break;
- case scTrack:
- Label2->Caption = "U₧ivatel p°emis¥uje madlo posuvnφku.";
- break;
- case scTop:
- Label2->Caption = "U₧ivatel p°esouvß madlo posuvnφku za lev² nebo hornφ okraj posuvnφku.";
- break;
- case scBottom:
- Label2->Caption = "U₧ivatel p°esouvß madlo posuvnφku za prav² nebo spodnφ okraj posuvnφku.";
- break;
- case scEndScroll:
- Label2->Caption = "U₧ivatel dokonΦil p°esun madla posuvnφku.";
- break;
- default:
- break;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::Button1Click(TObject *Sender)
- {
- char buf[5];
-
- if (atoi(PosEdit->Text.c_str()))
- ScrollBar1->Position = atoi(PosEdit->Text.c_str());
- else
- PosEdit->Text = itoa(ScrollBar1->Position, buf, 10);
-
- if (atoi(MinEdit->Text.c_str()))
- ScrollBar1->Min = atoi(MinEdit->Text.c_str());
- else
- MinEdit->Text = itoa(ScrollBar1->Min, buf, 10);
-
- if (atoi(MaxEdit->Text.c_str()))
- ScrollBar1->Max = atoi(MaxEdit->Text.c_str());
- else
- MaxEdit->Text = itoa(ScrollBar1->Max, buf, 10);
-
- if (atoi(LargeEdit->Text.c_str()))
- ScrollBar1->LargeChange = (short) atoi(LargeEdit->Text.c_str());
- else
- LargeEdit->Text = itoa(ScrollBar1->LargeChange, buf, 10);
-
- if (atoi(SmallEdit->Text.c_str()))
- ScrollBar1->SmallChange = (short) atoi(SmallEdit->Text.c_str());
- else
- SmallEdit->Text = itoa(ScrollBar1->SmallChange, buf, 10);
-
- Button1->Enabled = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::FormCreate(TObject *Sender)
- {
- char buf[5];
- PosEdit->Text = itoa(ScrollBar1->Position, buf, 10);
- MinEdit->Text = itoa(ScrollBar1->Min, buf, 10);
- MaxEdit->Text = itoa(ScrollBar1->Max, buf, 10);
- LargeEdit->Text = itoa(ScrollBar1->LargeChange, buf, 10);
- SmallEdit->Text = itoa(ScrollBar1->SmallChange, buf, 10);
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::EnableButton(TObject *Sender, char &Key)
- {
- Button1->Enabled = true;
- }
- //---------------------------------------------------------------------------
-
-