如何为图像编写IF语句?我希望编辑中的文本根据图像选择而更改
如果您在游戏中获得了每种动物的图像,并被告知单击您的选择之一。您单击一只鹿,这将带您进入下一个形式。下一张表格要求您在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
。
根据单击的 图像进行更改大批。
发件人
onclick
处理程序的参数将告诉您单击哪个图像,然后您可以读取该图像的tag> tag
值并使用它来分配图像的单词从数组到编辑
控制。Something like
Form2.Edit1.Text := 'deer';
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. TheSender
parameter of theOnClick
handler will tell you which image was clicked on, then you can read that image'sTag
value and use it to assign the image's word from the array to theEdit
control.