Article | 70002157 |
Type | HowTo |
Product | Engine |
Version | 8 |
Date Added | 2/8/2022 12:00:00 AM |
Fixed | 10.1001.0.1 (2/8/2022 12:00:00 AM) |
Submitted by | Francesco Rullo |
Summary
How can I increase the text size in property grid and/or the colors in the status bar of the vdFramed control?
Solution
You can change the text size of the property grid it like:
vdPropertyGrid.vdPropertyGrid MyGridOnForm = vdFramedControl1.vdGrid; // here you need to set the vdGrid in your form MyGridOnForm.Grid.LargeButtons = true; // if you also need larger buttons Font fnt = MyGridOnForm.Grid.Font; float size = fnt.Size; float newSize = (float)(fnt.Size * 2.5); MyGridOnForm.Grid.Font = new Font(fnt.Name, newSize); fnt = MyGridOnForm.Controls[0].Font; float oldsize = fnt.Size; MyGridOnForm.Controls[0].Font = new Font(fnt.Name, newSize); MyGridOnForm.Grid.Height = MyGridOnForm.Grid.Height - (int)(newSize );The colors of the status bar can be changed like:
private void button1_Click(object sender, EventArgs e) { if (vdFramedControl1.Controls[1] != null && vdFramedControl1.Controls[1].Controls[0] != null && vdFramedControl1.Controls[1].Controls[0].BackColor != null) { vdFramedControl1.Controls[1].Controls[0].BackColor = Color.DimGray; } if (vdFramedControl1.Controls[1].Controls[0] !=null && vdFramedControl1.Controls[1].Controls[0] is System.Windows.Forms.ToolStrip) { System.Windows.Forms.ToolStrip VDFstrip1 = vdFramedControl1.Controls[1].Controls[0] as ToolStrip; foreach (var item in VDFstrip1.Items) { if (item is System.Windows.Forms.ToolStripSplitButton) { ((ToolStripSplitButton)item).ForeColor = Color.LightGreen; } if (item is System.Windows.Forms.ToolStripButton) { ((ToolStripButton)item).ForeColor = Color.Yellow; } if (item is System.Windows.Forms.ToolStripLabel) { ((ToolStripLabel)item).ForeColor = Color.Red; } if (item is System.Windows.Forms.ToolStripProgressBar) { //cannot change color } } } }