⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sampledockinglistbox.cpp

📁 胜天进销存源码,国产优秀的进销存
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SampleDockingListBox.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSampleDockingListBoxFrame *SampleDockingListBoxFrame;
//---------------------------------------------------------------------------
__fastcall TSampleDockingListBoxFrame::TSampleDockingListBoxFrame(TComponent* Owner)
  : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSampleDockingListBoxFrame::actAddExecute(TObject *Sender)
{
  ListBox->Items->Add(Edit->Text);
}
//---------------------------------------------------------------------------

void __fastcall TSampleDockingListBoxFrame::actDeleteExecute(
      TObject *Sender)
{
  ListBox->Items->Delete(ListBox->ItemIndex);
}
//---------------------------------------------------------------------------

void __fastcall TSampleDockingListBoxFrame::actClearExecute(
      TObject *Sender)
{
  ListBox->Items->Clear();
}
//---------------------------------------------------------------------------

void __fastcall TSampleDockingListBoxFrame::actAddUpdate(TObject *Sender)
{
  ((TCustomAction*)Sender)->Enabled = Edit->Text != "";
}
//---------------------------------------------------------------------------

void __fastcall TSampleDockingListBoxFrame::actDeleteUpdate(
      TObject *Sender)
{
  ((TCustomAction*)Sender)->Enabled = ListBox->ItemIndex != -1;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -