如何为图像编写IF语句?我希望编辑中的文本根据图像选择而更改

发布于 2025-02-13 23:00:25 字数 151 浏览 1 评论 0原文

如果您在游戏中获得了每种动物的图像,并被告知单击您的选择之一。您单击一只鹿,这将带您进入下一个形式。下一张表格要求您在3张图像之间进行选择,这些图像正确地拼出了鹿的相反性别。

我想知道如何在编辑中在第二个形式上显示“鹿”一词。以及如何在编辑中获取单词以根据单击的图像来更改。

If you are given of images of every animal, in a game and are told to click on one of your choice. You click on a deer and this takes you to the next form. The next form asks you to choose between 3 images which correctly spells the opposite gender of the deer .

I want to know how to display the word deer on the second form in an edit. And how to get the word in the edit to be able to change depending on the image clicked.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青巷忧颜 2025-02-20 23:00:25

如何在“编辑”中的第二个形式上显示鹿一词

如何在编辑中获取单词以根据图像单击

来更改

根据单击的 图像进行更改大批。 发件人 onclick处理程序的参数将告诉您单击哪个图像,然后您可以读取该图像的tag> tag值并使用它来分配图像的单词从数组到编辑控制。

how to display the word deer on the second form in an edit

Something like Form2.Edit1.Text := 'deer';

how to get the word in the edit to be able to change depending on the image clicked

I would put the words in an array, and then set the Tag property of each image to be the corresponding index in that array. The Sender parameter of the OnClick handler will tell you which image was clicked on, then you can read that image's Tag value and use it to assign the image's word from the array to the Edit control.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文