Toolstrip width not working yet height works fine.

  • Thread starter Thread starter nigelwright7557
  • Start date Start date
N

nigelwright7557

Guest
I am trying to change Toolstrip width to match text in the toolstrips width.

Using autosize doesnt work, the width is the full screen.

Changing autosize to false and then changing width and height only changes the height.

Any clues would be appreciated.

Image nigel = Image.FromFile(drivestring + @"\\pcbcad720\play.png");


ts1.BackColor = Color.Cyan;
ts1.Items.Add("Toolbar>>");
ts1.Items.Add("Edit line", nigel, new EventHandler(this.f1editlineclick));
ts1.Items.Add("New line", nigel, new EventHandler(f2newlineclick));
ts1.Items.Add("Edit text", nigel, new EventHandler(f3edittextclick));
ts1.Items.Add("New text", nigel, new EventHandler(f4newtextclick));
ts1.Items.Add("Edit symbol", nigel, new EventHandler(f5editsymbolclick));
ts1.Items.Add("New symbol", nigel, new EventHandler(f6newsymbolclick));
ts1.Items.Add("Add already used symbol", nigel, new EventHandler(newsymbolfromclick));


ts1.AutoSize = false;
ts1.Width = 500;
ts1.Height = 30;


Controls.Add(ts1);






n.Wright

Continue reading...
 
Back
Top