掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
FileListBoxの右クリックメニューについて (ID:8585)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
FileListBox1のPopupMenuプロパティにPopupMenu1を設定せずに ポップアップメニューを表示させる方法を使ってみました。 // OnMouseDown procedure TForm1.FileListBox1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var PS, PC: TPoint; i: Integer; begin if Button = mbRight then begin GetCursorPos(PS); PC := FileListBox1.ScreenToClient(PS); i := FileListBox1.ItemAtPos(PC, True); if i <> -1 then FileListBox1.ItemIndex := i; PopupMenu1.Popup(PS.X, PS.Y); end; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.