ComboInput.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //----------------------------------------------------------------------------
  2. #ifndef ComboInputH
  3. #define ComboInputH
  4. //----------------------------------------------------------------------------
  5. #include <vcl\System.hpp>
  6. #include <vcl\Windows.hpp>
  7. #include <vcl\SysUtils.hpp>
  8. #include <vcl\Classes.hpp>
  9. #include <vcl\Graphics.hpp>
  10. #include <vcl\StdCtrls.hpp>
  11. #include <vcl\Forms.hpp>
  12. #include <vcl\Controls.hpp>
  13. #include <vcl\Buttons.hpp>
  14. #include <vcl\ExtCtrls.hpp>
  15. //----------------------------------------------------------------------------
  16. #include <SessionData.h>
  17. //----------------------------------------------------------------------------
  18. class TComboInputDialog : public TForm
  19. {
  20. __published:
  21. TButton * OKButton;
  22. TButton * CancelButton;
  23. TComboBox * InputCombo;
  24. TLabel *InputLabel;
  25. TButton *HelpButton;
  26. void __fastcall InputComboChange(TObject * Sender);
  27. void __fastcall FormShow(TObject *Sender);
  28. void __fastcall HelpButtonClick(TObject *Sender);
  29. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  30. public:
  31. virtual __fastcall TComboInputDialog(TComponent * AOwner);
  32. void __fastcall StoredSessionsCloseQuery(TObject * Sender, bool &CanClose);
  33. __property TStrings * Items = { read=GetItems, write=SetItems };
  34. __property AnsiString Prompt = { read=GetPrompt, write=SetPrompt };
  35. __property AnsiString Text = { read=GetText, write=SetText };
  36. __property bool AllowEmpty = { read=FAllowEmpty, write=FAllowEmpty };
  37. __property TInputValidateEvent OnInputValidate = { read=FOnInputValidate, write=FOnInputValidate };
  38. private:
  39. bool FAllowEmpty;
  40. TInputValidateEvent FOnInputValidate;
  41. void __fastcall UpdateControls();
  42. void __fastcall SetSessionList(TStoredSessionList * value);
  43. void __fastcall SetText(AnsiString value);
  44. AnsiString __fastcall GetText();
  45. void __fastcall SetPrompt(AnsiString value);
  46. AnsiString __fastcall GetPrompt();
  47. void __fastcall SetItems(TStrings * value);
  48. TStrings * __fastcall GetItems();
  49. };
  50. //----------------------------------------------------------------------------
  51. #endif