I dynamically create buttons on a form and use the button text as ids so that I can pass that to an SQL query to pull saved data about that button when necessary, but I also use an image over buttons that have information saved about them. What I need to know is how do I keep the text on the button from appearing when there is an image assigned to that button? By default vb.net shows both the text and the image and no TextImageRelation values allow for the image to take precedence. I tried changing the text color to transparent, but the outline of the text is still visible through the image. Is there anyway to keep the text value as it is but just show the image on the button?
A:
not sure, but why not just set the value to a variable to be passed to the SQL on the button click event and not place the text on the button? If you are using the same button click event for several buttons you could check the sender's ID and then set the variable based on that.
Jay
2009-08-10 01:17:32
simply put, I really don't know how to keep track of the buttons' ids when I create them. They are created in a for loop either out of a database when the program starts or when a new tab is created. I had just thought using the text would be a simpler method, but I might be wrong.
MaQleod
2009-08-10 01:39:20