2

I need a WinForms control that will allow me to add control such as Images and Buttons to it. Preferably the height should be "stretchable," too - I'm trying a ToolStrip control, and it won't allow me to change its height.

Should I be using a Panel instead? Or something else altogether?

It must be a native component; we're avoiding 3rd party stuff like the plague.

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • I'm not familiar with the Delphi stuff, what is the purpose of this control other than as a container? If it's just a container, you could use a Panel, but you could also just place the controls directly on the form. – CodingGorilla Mar 23 '12 at 20:43
  • It autosizes based on what it contains, so you'd stretch images and buttons and the control will sort itelf out. Save yourself a lot of heartache, use the vanilla options, don't try and reinvent TControlBar – Tony Hopkinson Mar 23 '12 at 20:52
  • ToolstripLabel and ToolstripButton don't seem to be stretchable - if I change their dimensions in the property editor, it just blithely changes them back with nary a how-de-do. – B. Clay Shannon-B. Crow Raven Mar 23 '12 at 21:09

1 Answers1

3

The VCL TControlBar is basically a docking site for a TToolBar or another controls, a ToolStrip is more like a VCL TToolBar so in your case the more similar component can be a Panel.

RRUZ
  • 134,889
  • 20
  • 356
  • 483