motif can set a fixed min/max Width/Heigh on a shell widget The values can be set in an Xdefaults file like $ cat Xdefaults memo.minWidth: 200 memo.minHeight: 300 $ xrdb -merge Xdefaults $ ./memo sdf sw: 200, sh: 300 lw: 22 lh: 17 ^C On the command line: $ ./memo -xrm 'memo.minWidth: 50' asdf sw: 50, sh: 65535 lw: 28 lh: 17 sw: 50, sh: 50 ^C Hardcoded in the source file as of you set line 6 in memo.c to 1 $ ./memo sdf sw: 100, sh: 50 lw: 22 lh: 17 ^C or dynamically like one line 60 $ ./memo sdfasddaaaaddddddddddddddasssssssssss sw: 100, sh: 50 lw: 226 lh: 17 sw: 226, sh: 50 ^C