対応する画像を呼び出す皆さん、こんにちは。些細なことかもしれませんが、インデックスで何も見つけられませんでした。
100、200、300 などの製品の長さのドロップダウン リストを作成しました。
長さごとに、対応する製品の写真を表示したいと思います。すべての写真をフォルダーに入れて名前を付けました。
これを可能にする関数が jsl にありますか?
ありがとう!
自動化とスクリプトコンテンツの編成データアクセスデータのブレンドとクリーンアップウィンドウズRe: 対応する画像を呼び出す// there are a lot of pics here, pick 6 for the list
files = Files In Directory( "f:/pics" )[10 :: 15];
New Window( "Example",
H List Box(
cb = Combo Box(
files,
selection = cb << GetSelected();
img = New Image( "f:/pics/" || selection );
(bb << child) << delete;// clear the old one
bb << append( img ); // add the new one
),
bb = Border Box( Text Box() ) // start with a dummy old one
)
);
[10::15] を削除して、すべての画像を取得します。 FilterEach(...) を使用して、.JPG または .PNG ファイルのみを保持することができます。 この例では、イメージ名がコンボ ボックスの表示に適していると想定しています。 別の単語が必要な場合は、<
The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.The picture changes with each combo box selection.コンボ ボックスを選択するたびに画像が変わります。
Re: 対応する画像を呼び出すクレイジさん、返信ありがとうございます!それはまさに私が必要とするものです。 しかし、コードを適用するときにエラーが発生しました。 画像をフォルダに入れ、ディレクトリを取得して「f:/pics/」を置き換えました。 ドロップダウン ボックスが生成されて表示されますが、画像は表示されません。 ドロップダウン ボックスで写真を選択すると、エラーが表示され、「
'New Image' のアクセスまたは評価でファイルが見つかりません " 何が問題か知っていますか?
Re: 対応する画像を呼び出す行方不明 / パスとファイル名が結合されている場合。