Example #1
0
def change_pages():
    unhook_events()
    part = topComboBoxPart.SelectedIndex

    unhook_events()
    topComboBoxPage.Items.Clear()
    bottomComboBoxPage.Items.Clear()
    if part == 0:
        return

    items = get_list('docs/part%s/list.txt' % part)

    topCombobox = topComboBoxPage
    bottomComboBox = bottomComboBoxPage

    items = ['Index'] + items
    for combobox in topCombobox, bottomComboBox:
        for item in items:
            boxitem = ComboBoxItem()
            boxitem.Content = item
            boxitem.Height = 25
            combobox.Items.Add(boxitem)

    topComboBoxPage.SelectedIndex = 0
    bottomComboBoxPage.SelectedIndex = 0
    hook_events()
Example #2
0
def change_pages():
    unhook_events()
    part = topComboBoxPart.SelectedIndex

    unhook_events()
    topComboBoxPage.Items.Clear()
    bottomComboBoxPage.Items.Clear()
    if part == 0:
        return

    items = get_list("docs/part%s/list.txt" % part)

    topCombobox = topComboBoxPage
    bottomComboBox = bottomComboBoxPage

    items = ["Index"] + items
    for combobox in topCombobox, bottomComboBox:
        for item in items:
            boxitem = ComboBoxItem()
            boxitem.Content = item
            boxitem.Height = 25
            combobox.Items.Add(boxitem)

    topComboBoxPage.SelectedIndex = 0
    bottomComboBoxPage.SelectedIndex = 0
    hook_events()
Example #3
0
def setup_parts():
    items = get_list('docs/list.txt')

    topCombobox = topComboBoxPart
    bottomComboBox = bottomComboBoxPart

    items = ['Index'] + items
    for combobox in topCombobox, bottomComboBox:
        for item in items:
            boxitem = ComboBoxItem()
            boxitem.Content = item
            boxitem.Height = 25
            combobox.Items.Add(boxitem)

    topCombobox.SelectionChanged += on_change_top_part
    bottomComboBox.SelectionChanged += on_change_bottom_part

    topCombobox.SelectedIndex = bottomComboBox.SelectedIndex = 0
Example #4
0
def setup_parts():
    items = get_list("docs/list.txt")

    topCombobox = topComboBoxPart
    bottomComboBox = bottomComboBoxPart

    items = ["Index"] + items
    for combobox in topCombobox, bottomComboBox:
        for item in items:
            boxitem = ComboBoxItem()
            boxitem.Content = item
            boxitem.Height = 25
            combobox.Items.Add(boxitem)

    topCombobox.SelectionChanged += on_change_top_part
    bottomComboBox.SelectionChanged += on_change_bottom_part

    topCombobox.SelectedIndex = bottomComboBox.SelectedIndex = 0