separate visual objects: bevel/rectangle

G

Guest

Hi,

I come from Delphi development, and I really miss the ability to separate
text boxes, and other visual elements on the form with ... something like
bevel was in Delphi. What I mean: in design time I would like to draw a
rectangle around some objects, or draw a horizontal or vertical line on the
form, what shows immediatelly on the screen.
Is there a such object collection? How do you used to do this? With Panels?
Isn't there too much overhead, if you use panels for this?

Thanks:

Peter
 
D

Dmytro Lapshyn [MVP]

Hi Peter,

I recall such a trick can be done with labels. Set the text to an empty
string and enable a 3D border for the label. To get a horizontal or a
vertical line, set the height or the width respectively to 1px.
 
S

Stoitcho Goutsev \(100\)

Peter,

There is no beles as in VCL. Horizontal and Vertical line you can do by
using Panel with small width or height and 3D border. Don't worry about the
overhead in VCL they are implemented exactly like this.
 
H

Herfried K. Wagner [MVP]

Peter Baranyi said:
I come from Delphi development, and I really miss the ability to separate
text boxes, and other visual elements on the form with ... something like
bevel was in Delphi. What I mean: in design time I would like to draw a
rectangle around some objects, or draw a horizontal or vertical line on
the
form, what shows immediatelly on the screen.
Is there a such object collection? How do you used to do this? With
Panels?
Isn't there too much overhead, if you use panels for this?

For boxes, check out the groupbox control.

Rules:

Wrapping Win32 Controls in .NET - Horizontal and Vertical Rules
<URL:http://www.codeproject.com/cs/miscctrl/hvrules1.asp>

Alternatively you can use a label control with width or height set to 2, and
'BorderStyle' set to 'Fixed3D' to create an inset line.

Shapes and lines:

Advanced Shape Control
<URL:http://www.codeproject.com/vb/net/advanced_shape_control.asp>

LineControls.exe
<URL:http://www.gotdotnet.com/team/vb/LineControls.exe>
<URL:http://download.microsoft.com/download/7/e/0/7e070297-47fe-4443-9194-ab57acd8ea01/LineControls.msi>

Creating transparent Windows Forms controls.
<URL:http://www.bobpowell.net/transcontrols.htm>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top