Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I put default images and captions in my class?
Message
From
09/08/2004 09:46:39
 
 
To
09/08/2004 03:09:05
Czarina Joyce Villanueva
Innovision Systems International
Manila, Philippines
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00931505
Message ID:
00931758
Views:
19
OK. What Kevin suggested is good for a container class that contains more than one control (as in his example, an OK and a Cancel button), but if you're only wanting a single control (a single button in your case) then it's overkill to visually create a container that way ... however, you can still use that idea ... just dropping a button on a test Form or UserControl and configuring it the way you want it is a *great* way to see what code the IDE generates and then you'd know what you need to put in your class. After awhile you get the hang of it and don't need to do a "test" first. That's all I did to get the additional code you'd need to align your text and image:
this.Image = System.Drawing.Image.FromFile("images\newreq.bmp");
this.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;

this.Text = "OK";
this.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
~~Bonnie



>Thanks Bonnie,
>
>I want a default button with Text = "Ok" and at the right side of it is a check bitmap (whether a bitmap, icon, etc.). This way the button is already available for drag & drop without changing the Text and Image properties. This is relatively easy in VFP classes.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform