Changeset 11764:30121d80d7ee in orange


Ignore:
Timestamp:
11/14/13 15:43:57 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed "Select Data" widget layout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWSelectData.py

    r11748 r11764  
    9595 
    9696        self.boxIndices = {} 
    97         self.valuesStack = QStackedWidget(self) 
    98         glac.addWidget(self.valuesStack, 0, 2) 
     97        boxValues = OWGUI.widgetBox(self, "Values", addToLayout=0) 
     98        self.valuesStack = QStackedWidget() 
     99        boxValues.layout().addWidget(self.valuesStack) 
     100        glac.addWidget(boxValues, 0, 2) 
    99101 
    100102        # values 0: empty 
    101         boxVal = OWGUI.widgetBox(self, "Values", addToLayout = 0) 
     103        boxVal = OWGUI.widgetBox(self.valuesStack, addToLayout = 0) 
    102104        self.boxIndices[0] = boxVal 
    103105        self.valuesStack.addWidget(boxVal) 
    104106 
    105107        # values 1: discrete 
    106         boxVal = OWGUI.widgetBox(self, "Values", addToLayout = 0) 
     108        boxVal = OWGUI.widgetBox(self.valuesStack, addToLayout = 0) 
    107109        self.boxIndices[orange.VarTypes.Discrete] = boxVal 
    108110        self.valuesStack.addWidget(boxVal) 
     
    110112 
    111113        # values 2: continuous between num and num 
    112         boxVal = OWGUI.widgetBox(self, "Values", addToLayout = 0) 
     114        boxVal = OWGUI.widgetBox(self.valuesStack, addToLayout = 0) 
    113115        self.boxIndices[orange.VarTypes.Continuous] = boxVal 
    114116        self.valuesStack.addWidget(boxVal) 
     
    124126 
    125127        # values 6: string between str and str 
    126         boxVal = OWGUI.widgetBox(self, "Values", addToLayout = 0) 
     128        boxVal = OWGUI.widgetBox(self.valuesStack, addToLayout=0) 
    127129        self.boxIndices[orange.VarTypes.String] = boxVal 
    128130        self.valuesStack.addWidget(boxVal) 
     
    902904if __name__=="__main__": 
    903905    import sys 
    904     #data = orange.ExampleTable('dicty_800_genes_from_table07.tab') 
    905     data = orange.ExampleTable('../../doc/datasets/adult_sample.tab') 
    906 #    data = orange.ExampleTable(r"E:\Development\Orange Datasets\UCI\iris.tab") 
     906 
     907    data = orange.ExampleTable('brown-selected.tab') 
    907908    # add meta attribute 
    908909    #data.domain.addmeta(orange.newmetaid(), orange.StringVariable("workclass_name")) 
Note: See TracChangeset for help on using the changeset viewer.