Hej DiZpel
Jo, her kommer indholdet i uniten. For at nå dertil har jeg gjort følgede først:
1) Lavet en ny Application.
2) Placeret en RadioGroup
3) Valgt RadioGroup.Items
4) Fyldt tre strenge i .Items
5) Lavet en Event i ContextPopup
6) Lavet InputBox (men kunne have lavet meget andet)
Unit1.dfm koden her:
object Form1: TForm1
Left = 192
Top = 107
Width = 870
Height = 640
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object RadioGroup1: TRadioGroup
Left = 280
Top = 80
Width = 185
Height = 105
Caption = 'RadioGroup1'
Items.Strings = (
'Aaa'
'Bbb'
'Ccc')
TabOrder = 0
OnContextPopup = RadioGroup1ContextPopup
end
end
Unit1.pas koden her:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
RadioGroup1: TRadioGroup;
procedure RadioGroup1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.RadioGroup1ContextPopup(Sender: TObject; MousePos: TPoint;
var Handled: Boolean);
begin
InputBox('Overskriften','Ledeteksten','Startteksten');
end;
end.
Bobby2