0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【TeamDeveloper】チェックボックスにチェックを入れる方法

Last updated at Posted at 2025-01-28

問題

プログラムでチェックボックスにチェックを入れたい場合。
以下のようにチェックボックスの名前をベタで指定する場合はそのまま通ります。

OK
Set cb1 = TRUE

が、ウィンドウハンドルを使用する場合はこのままだと通りません。

NG
Set hWndItem = TRUE

解決策

Team Developer7.3以降の場合ですが SalSetButtonChecked関数を使うと可能になります。

Call SalSetButtonChecked( Handle, nCheck )

nCheck = 1 はチェックあり
nCheck = 0 はチェックなし
返り値はTrue or false っぽい

なぜか公式ドキュメントに載っていなかったので見つけるのに苦労しました……。
言語がマイナーすぎる故なのかな。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?