# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1044183699 0 # Node ID f8b50901ac457453c201bf371c5e6af300cbe575 # Parent f2d1e231922e73ad4e899baa9b06bb46f5b69596 Added verticle scrollbar test to the sample. diff -r f2d1e231922e -r f8b50901ac45 dwtest.c --- a/dwtest.c Sat Feb 01 18:40:49 2003 +0000 +++ b/dwtest.c Sun Feb 02 11:01:39 2003 +0000 @@ -20,6 +20,7 @@ notebookbox2, notebook, scrollbar, + scrollbar2, status, stext, pagebox, @@ -166,9 +167,21 @@ int i,y,depth = dw_color_depth(); char buf[10]; HPIXMAP text1pm,text2pm; + HWND hbox; pagebox = dw_box_new(BOXVERT, 5); - dw_box_pack_start( notebookbox2, pagebox, 1, 1, TRUE, TRUE, 0); + dw_box_pack_start(notebookbox2, pagebox, 0, 0, TRUE, TRUE, 0); + + hbox = dw_box_new(BOXHORZ, 0); + dw_box_pack_start(pagebox, hbox, 0, 0, TRUE, TRUE, 0); + + pagebox = dw_box_new(BOXVERT, 0); + dw_box_pack_start(hbox, pagebox, 0, 0, TRUE, TRUE, 0); + + scrollbar2 = dw_scrollbar_new(TRUE, 100, 50); + dw_box_pack_start(hbox, scrollbar2, 20, 100, FALSE, TRUE, 0); + dw_scrollbar_set_range(scrollbar2, 100, 50); + dw_scrollbar_set_pos(scrollbar2, 10); textbox1 = dw_render_new( 100 ); dw_box_pack_start( pagebox, textbox1, font_width*width1, font_height*rows, TRUE, TRUE, 4); @@ -209,6 +222,7 @@ dw_signal_connect(textbox1, "expose_event", DW_SIGNAL_FUNC(text_expose), text1pm); dw_signal_connect(textbox2, "expose_event", DW_SIGNAL_FUNC(text_expose), text2pm); dw_signal_connect(scrollbar, "value_changed", DW_SIGNAL_FUNC(scrollbar_valuechanged), (void *)status); + dw_signal_connect(scrollbar2, "value_changed", DW_SIGNAL_FUNC(scrollbar_valuechanged), (void *)status); } /* Beep every second */