Welcome Guest Search | Active Topics | Sign In | Register

How to place a button on a dialog Options
Brian Ford
Posted: Friday, September 24, 2010 11:53:38 AM
Rank: Member
Groups: Member

Joined: 8/5/2010
Posts: 16
I know I'm probably missing something simple here but....

I have Dialog that I am showing through code (VB.NET) I can see where to change the text that is displayed in the dialog, but I cannot figure out how to show a button there??

I simply need to show a message with 2 buttons, "Yes" or "No" and capture what button was used to close the dialog.

How do I do that??
eo_support
Posted: Friday, September 24, 2010 12:20:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You would just right click the dialog, then select "Edit Template -> Content Template", that would switch the dialog into template editing mode and turn it into a container. You can then put whatever control in it.

Thanks!
Brian Ford
Posted: Friday, September 24, 2010 12:44:36 PM
Rank: Member
Groups: Member

Joined: 8/5/2010
Posts: 16
That's perfect thank you, I knew it would be something simple :)
Brian Ford
Posted: Friday, September 24, 2010 12:50:44 PM
Rank: Member
Groups: Member

Joined: 8/5/2010
Posts: 16
Sorry, but one more question...

how do I return the value of which button was clicked to close the form?

I have set the 'AcceptButton' and 'CancelButton' properties to the relevant buttons, but I'm not sure how to use the getResult option, do you have VB code example?
eo_support
Posted: Friday, September 24, 2010 12:59:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You don't have to use AcceptButton or CancelButton. Just ignore the fact that the button is inside the dialog and handle the button's Click event the same way as you do with any other buttons.

Thanks
Brian Ford
Posted: Friday, September 24, 2010 1:00:55 PM
Rank: Member
Groups: Member

Joined: 8/5/2010
Posts: 16
Ecellent,

thanks again


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.