Right clicking in a dialog box

45 ビュー (過去 30 日間)
Vincent
Vincent 2011 年 8 月 30 日
コメント済み: Dominique Joubert 2018 年 8 月 22 日
Hi,
I'm creating a dialog box to let users enter function parameters. I'm using the inputdlg-function. Surprisingly I'm not able to right-click any field (e.g. to copy and paste values).
Of course, you can use keyboard shortcuts, but I'm interested why this occurs and how I can fix this.
Has anyone an idea?

回答 (1 件)

Friedrich
Friedrich 2011 年 8 月 30 日
Hi,
This is a bit tricky. There is a solution available which shows you how to get a context menu:
You can apply this on the inputdlg function but you have to modify it. I do not recommend modifying MALAB function so best this here is to a make a copy, rename it to a unique name and start modifying it. Since the inputdlg function uses two functions which have private access (getnicedialoglocation.m and setdefaultbutton) you have to copy these files near to your modified example. Best way here, is to rename those functions two.
I prepared an example that shows you how to do it. I uploaded it here:
Note that the mentioned limitation (in the solution above) doesn't hold for this example.
  1 件のコメント
Dominique Joubert
Dominique Joubert 2018 年 8 月 22 日
can you please repost that file, I also need to right click in an inputdgl

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by