Actually, it seems like the problem is with the /dialog -s command, rather than the $dialog().ch identifier.
- create a dialog with a size of 200px x 200px with 0 menus
- //echo -a $dialog($dname).ch = 200px
- //dialog -s $dname -1 -1 200 $dialog($dname).ch
- create a dialog with a size of 200px x 200px with 3 menus (should create 1 row of menus)
- //echo -a $dialog($dname).ch = 200px
- //dialog -s $dname -1 -1 200 $dialog($dname).ch
- //echo -a $dialog($dname).ch = 180px
- create a dialog with a size of 200px x 200px with 6 menus (should create 2 rows of menus)
- //echo -a $dialog($dname).ch = 200px
- //dialog -s $dname -1 -1 200 $dialog($dname).ch
- //echo -a $dialog($dname).ch = 160px
This shows that when the dialog is first created, the client area h=200px + menu height (seems logical). When you read $dialog().ch, you get the client area excluding the additional menu height (also seems logical). However, when you change the dialog size using /dialog -s, the menu height is SUBTRACTED from the client area (200px) causing the new client area to be smaller.
The action of /dialog -s is incorrect (in my opinion).
-genius_at_work