I have a form generator that makes all the dbEdits the same width. The result looks nice, but I think it would be better if the dbEdit width was tailored to the field widths. I’ve tried playing with different formulas, but my results have been really hit or miss. I need something a little more consistent, but haven’t been able to figure it out or find anything that says “do it like this:”
Any suggestions would be greatly appreciated!
You could examine the
Field.DisplayWidth/Field.Sizeand re-factor thedbEdit.Width(e.g. 1 unit ofTFieldsize equals 15 pixels) against a maximum Width (e.g The containter Panel/Form) usingdbEdit.ScaleBy(which internally usesMulDivfunction).