Roman K (Developer Express):
Hi guys,
We already have this feature.
Each BaseEdit successor has the AutoSizeInLayoutControl property. At the moment, this property is not available in the property grid for all editors. So, you can manage it via code. Here is a code snippet
private void Form1_Load(object sender, EventArgs e) {
this.textEdit1.AutoSizeInLayoutControl = true;
this.dateEdit1.AutoSizeInLayoutControl = true;
}
You can change the AutoSizeInLayoutControl property's default value by creating your own successors like this
public class MyAutoSizeTextEdit : TextEdit {
public MyAutoSizeTextEdit() {
AutoSizeInLayoutControl = true;
}
}
I have tried setting this property but with no joy. I do have an editmask on a spinedit control of #######.00 but it doesn't seem to resize it.
What I need is the box to be the correct size on size changes on the screen so if for example the user maximizes the screen, the spin edit box should stay the same size which I know I can do by locking the size.
The problem is that if I size the box so it looks correct on my screen, then run the app on my bosses laptop which is a different monitor and more widescreen, it is the wrong size e.g. 9999999.99 will show as 999999.99 (cutting off the last 9).
Is there anyway around this or is it something to do with my layout?
Regards