I believe the only way for obtaining the dimensions of a dialog in pixels is to divide $dialog().w,etc. for $dbuw and $dbuh.
However, this is far inneffective. With my DPI settings, $dbuw returns 2.5 and this oftens results in non integer values:
alias teste { clear echo -s $dialog(server_list).w px -- $calc(($dialog(server_list).w / $dbuw)) dbu
dialog -sb server_list $dialog(server_list).x $dialog(server_list).y $calc(($dialog(server_list).w / $dbuw) -1) -1 echo -s $dialog(server_list).w px -- $calc(($dialog(server_list).w / $dbuw)) dbu
}
I got:
603 px -- 241.2 dbu
606 px -- 242.4 dbu
Even tough I subtracted 1 DBU, the dialog got larger.
It may be possible to obtain the desired results here - I don't know - however, my point is this is an awkward situation.
My apologies if this topic has already been discussed or there is a solution.