Showing posts with label Membuat Menu Popup dengan Delphi. Show all posts
Showing posts with label Membuat Menu Popup dengan Delphi. Show all posts

Membuat Menu Popup dengan Delphi

Friday, February 15, 2008

  • Buat sebuah Project baru tambahkan sebuah komponen Memo yang ada pada tab Standard.

  • Drag komponen Memo tersebut hingga lebarnya memenuhi form.

  • Tambahkan baris program berikut pada event OnMouseUp komponen Memo :






var TitikClient,TitikLayar: TPoint;

begin

if Memo1.SelLength>0 then

begin

TitikClient.X := X;

TitikClient.Y := Y;

TitikLayar := ClientToScreen (TitikClient);

PopupMenu1.Popup (TitikLayar.X, TitikLayar.Y);

end;

end;


Recent Comments

Tags Cloud

Blogumulus by Roy Tanck and Amanda Fazani