Tag

button

  • Total Source Code 3
  • Total Page : 1
  • You currently on page number : 1

Access the controls of a TRadioGroup

  • 16 December 2013
  • 198
  • delphi,radio button,TRadioGroup

How to access the controls of a TRadioGroup   procedure RGB_EnableItem(RadioGroup: TRadioGroup; ItemIndex: Byte; bEnabled: Boolean); begin RadioGroup.Controls[ItemIndex].Enabled := bEnabled; end; // Example: Deactivates the 2. Item (Index starts at 0) procedure TForm1.Button1Click(Sender: TObject); begin RGB_EnableItem(RadioGroup1, 1, False); end; {2. Read more


Disable Close button on form caption

  • 10 January 2014
  • 192
  • disable,close,button

//See this example. For enabling button use MF_ENABLED instead of MF_GRAYED.procedure TForm1.Button1Click(Sender: TObject); var Flag: UINT; AppSysMenu: THandle; begin AppSysMenu:=GetSystemMenu(Handle,False); Flag:=MF_GRAYED; EnableMenuItem(AppSysMenu,SC_CLOSE,MF_BYCOMMAND or Read more


Disable the Close X button on a Form

  • 22 February 2014
  • 169
  • disable,close,button

Source code for hide close button from a from procedure TFMain.FormCreate(Sender: TObject); var hMenuHandle: Integer; begin hMenuHandle := GetSystemMenu(Handle, False); if (hMenuHandle 0) then DeleteMenu(hMenuHandle, SC_CLOSE, Read more




Category