开发者

Resize form based on if subform visible

开发者 https://www.devze.com 2022-12-27 07:25 出处:网络
I have a form with a subform on it. If subform contains no records, it\'s visible property is false. In that case, I\'d like the outer form to shrink so that there isn\'t a big empty space where the s

I have a form with a subform on it. If subform contains no records, it's visible property is false. In that case, I'd like the outer form to shrink so that there isn't a big empty space where the subform was.

The long way to do this would be by setting the position 开发者_运维技巧for all the controls on the form based on whether the subform is visible. However, is there an easier way to do this (maybe with the can grow/ can shrink property)?


Can grow/can shrink does not apply to forms. But for a superquick solution, try putting your subform in the footer of the main form. You can then quickly make your footer visible or not depending on the subform contents.

0

精彩评论

暂无评论...
验证码 换一张
取 消