473,563 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Size of ToolStrip


The ToolStrip on top of my form is to small. I want to increase its
height. Simply setting the Height-property doesn't change the height,
though. So I tried to place the ToolStrip in a ToolStripPanel, that does
react to changes in its Height-property, and by setting the
Dock-property of the contained ToolStrip to DockStyle.Fill, I expected
the ToolStrip to fill the entire ToolStripPanel. Nope. See the code
below, it is ready to run.


namespace Namespace1
{

using System.Windows. Forms;

class Form1:Form
{

public Form1()
{
Text="How to expand a ToolStrip?";
ToolStripPanel toolstrippanel= new ToolStripPanel( );
ToolStrip toolstrip=new ToolStrip
(
new ToolStripButton[]
{
new ToolStripButton ("One"),
new ToolStripButton ("Two"),
new ToolStripButton ("Three"),
}
);
toolstrippanel. Height=89;
toolstrippanel. Join(toolstrip) ;
toolstrip.Heigh t=89; //does not work
toolstrip.Dock= DockStyle.Fill; //does not work
Controls.Add(to olstrippanel);
}
}

static class Program
{
[System.STAThrea d]
static void Main()
{
Application.Ena bleVisualStyles ();
Application.Run (new Form1());
}
}
}
Aug 29 '07 #1
0 2607

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8588
by: MLM450 | last post by:
I am trying to create a button on a toolstrip that is used to select a color. After the user selects their color, a portion of the button's image is changed to that color (similar to the highlighter button in Microsoft Word). How can this be done? I tried making part of the button's image transparent and then changed the button's BackColor...
2
1316
by: Fredrik Melin | last post by:
2005 RTM: Have a form, quite a few control, (full form of stuff, tab pages, buttons, labels, text-controls etc) Selecting controls, going in and out between code/design view is a little bit sluggy, but still doable Add a Toolstrip, add a few buttons to that toolstrip
1
6688
by: Alex Clark | last post by:
Hi all, I'm using the ToolStrip in .NET 2.0, and I can't seem to find a way to change the size of it. What I want is a toolbar the size of the IE toolbar, preferably with text below images if possible. Can anyone shed any light on how to do this? Thanks, Alex Clark
0
2249
by: Jon Davis | last post by:
I'm taking the items from a menustrip of a control and moving them to the parent form's menustrip: private void TakeMenus(AdminControl ac) { foreach (Control c in ac.Controls) { if (c is MenuStrip) { MenuStrip ms = (MenuStrip)c;
0
1880
by: Anand Ganesh | last post by:
Hello Everybody, I am using the ToolStrip Control in .NET 2.0. I am also using a ToolStripContainer Control. I want to know how to retain the position of the ToolStrip Control in the ToolStrip Container. For example if user drags the ToolStrip and Docks to the Bottom of the ToolStrip Container.
1
4018
by: Tom P. | last post by:
It's kind of hard to explain (so if you need more just ask) and any help would be greatly appreciated. I am writing a side-by-side file manager. On each side I have a DropDownButton that holds either the root name or the Favorite name for the current path. I also have a DropDownComboBox that has the current full path as well as a series of...
2
3008
by: daveL | last post by:
Hi I have a Toolstrip on a Window with 5 buttons i want to send this to a application static fucnction to enable / disable the buttons based on User rights When i send Window.controls to the method buttons dont exists in the Controls Collection When i work with the Toolstrip i can't see any controls
1
2974
by: priyamtheone | last post by:
In C# 2005 (.Net 2.0), while working with a toolstrip, if its TabStop property is set to TRUE and there are two comboboxes and a button in the toolstrip, why doesn't the button get any focus when the focus is moved from one control to another by pressing the TAB Key. This problem doesn't occur when the TabStop property of the toolstrip is FALSE....
3
7821
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
Ok, I have a menuStrip and a toolStrip. the menuStrip is laid out like this: Actions Connect Disconnect - Exit Pretty simple. The toolstrip has 1 item, a toolstripstatus. I decided I wanted to add a little icon next to the status text, so I opened up the image property in Design mode and imported 2 images. Both were PNG...
0
7664
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.