掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
FireMonkeyのTStringGridの入力でListViewやダイアログを表示させたい (ID:151265)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
こんな感じ? procedure TForm6.StringGrid1CellClick(const Column: TColumn; const Row: Integer); var X,Y,X1,Y1: Single; C: TColumn; ACOL,AROW: Integer; ARECT: TRECT; PopupColumn: TPopupColumn; begin if Column is TPopupColumn then begin PopupColumn := TPopupColumn(Column); X := Screen.MousePos.X - Form6.Left - StringGrid1.Position.X; Y := Screen.MousePos.Y - Form6.Top - StringGrid1.Position.Y - 10; X1 := Form6.Left + StringGrid1.Position.X + 3; Y1 := Form6.Top + StringGrid1.Position.Y + 33; StringGrid1.CellByPoint(X,Y,ACOL,AROW); ARECT := StringGrid1.CellRect(ACOL,AROW); Form7 := TForm7.Create(Self); Form7.Left := Trunc(X1+ARECT.Left); Form7.Top := Trunc(Y1+ARECT.Top ); Form7.ListBox1.Items.Assign(PopupColumn.Items); if Form7.ShowModal = mrOK then begin end; Form7.Free; end; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.