The scrollbars in a TextList which is inside a TabSet seem
funny. Below is a modification of program 17-3.icn from the
book, with the addition of scrolling TextLists on two tabs.
When it is run, a text line is added to the TextList on tab one,
and the scrollbar appears as it should. However, the 'elevator'
bar (or whatever it is called), appears not only on the desired
tab page, but the rest as well. This does not seem correct.
Any suggestions?
Wendell
####################################################
link gui
#
# Simple example of a TabSet
#
class TabDemo : _Dialog(quit_button,
list_1, list_2, num )
#
# Quit on button press.
#
method handle_quit_button(ev)
if ev.get_code() > 0 then
dispose()
end
method handle_default(ev)
end
method dialog_event(ev)
case ev.get_component() of {
quit_button : handle_quit_button(ev)
default : handle_default(ev)
}
end
method tick()
local l
num +:= 1
s := list_1.get_contents()
put(s, "tick " || num)
list_1.set_contents(s, *s)
list_1.goto_pos(*s)
end
initially
local tab_set, tab_item_1, tab_item_2,
tab_item_3, label_3
self._Dialog.initially()
attrib("size=355,295", "font=sans",
"bg=light gray", "resize=on")
#
# Create the TabSet
#
tab_set := TabSet("pos=50%,47", "size=200,150", "align=c,t")
#
# First pane
#
tab_item_1 := TabItem("label=Pane 1")
#
# Create a TextList, with some arbitrary content.
#
list_1 := TextList("pos=10,10", "size=80%,80%")
list_1.set_contents([])
tab_item_1.add(list_1)
tab_set.add(tab_item_1)
#
# Second pane
#
tab_item_2 := TabItem("label=Pane 2")
#
# Create a TextList, with some arbitrary content.
#
list_2 := TextList("pos=10,10", "size=80%,80%")
list_2.set_contents([])
tab_item_2.add(list_2)
tab_set.add(tab_item_2)
#
# Third pane
#
tab_item_3 := TabItem("label=Pane 3")
label_3 := Label("pos=50%,50%", "align=c,c", "label=Label 3")
tab_item_3.add(label_3)
tab_set.add(tab_item_3)
tab_set.set_which_one(tab_item_1)
add(tab_set)
#
# Add a quit button
#
quit_button := TextButton("pos=50%,234", "align=c,t",
"label=Quit")
add(quit_button)
num := 1
set_ticker(1000)
show_modal()
end
procedure main()
TabDemo()
end
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group