
//----------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "main.h"
#include <stdlib.h>
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TFormMain *FormMain;
//---------------------------------------------------------------------------
__fastcall TFormMain::TFormMain(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormMain::PageControl1Change(TObject *Sender)
{
char buf[3];
StatusBar1->SimpleText = "Page index: " +
AnsiString(itoa(PageControl1->ActivePage->PageIndex, buf, 10));
}
//---------------------------------------------------
这个博客内容涉及到了一个使用VCL(Visual Component Library)的Delphi程序,主要关注PageControl组件的PageChange事件。当PageControl的活动页面改变时,程序会更新StatusBar的文字,显示当前的页面索引。这是一个基本的用户界面交互处理示例。
2万+

被折叠的 条评论
为什么被折叠?



