views:

19

answers:

1

Hi

I want to a vertical scroll bar show up if the height of the dialog goes over so many pixels. However I have Height set to auto and it seems to keep growing and never makes a scroll bar.

If I set the Height to 400px then once it hits this a scroll bar is made. However I want to keep height as auto.

I thought MaxHeight might do the trick but it does not seem to work with what I am trying to do.

$("#dialog-message").dialog({
            modal: true,
            buttons: {
                Ok: function() {
                    $(this).dialog('close');
                }
            }
        });

If you specify no height auto is used.

+1  A: 

Just set the height/maxHeight and if the content can't fit within those dimensions - you will see scrollbars appear.

Marko