[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange text widget behaviour



Hi all,
    This question may have been answered before. If so, I apologise.

When setting up a text widget using a ysize of 1, it appears to be
impossible to later extend the widget to a size > 1. The text appears on
one continuous line.

I've tried the folowing program under 5.0 - 5.3 on Alpha/VMS and NT and
the same effect is noticed on them all.

pro try_tab
    base_1 = widget_base(column=1)
    base_2 = widget_base(column=1)
    text_1 = widget_text(base_1,value=['one'], ysize=1)
    text_2 = widget_text(base_2,value=['one','two'], ysize=2)
    widget_control,base_1,/realize
    widget_control,base_2,/realize
    wait,5.0                                                ; Just wait
for a while to enable change to be seen
    widget_control,text_1,set_value=['eight','nine','ten'],ysize=3
    widget_control,text_2,set_value=['eight','nine','ten'],ysize=3
end

If line 4 is replaced by
 text_1 = widget_text(base_1,value=['one'], ysize=2)

the required result is obtained. However, additional blank lines don't
look too good.

Is there a better workaround?

Regards,
    Ian