Hi,
but if i comment line 2 then it gives sam output and when i comment line 6 then it shows same two buttons not occupying the entire frame.Can any one explain this strange behaviour
i.e. what is the use of line 2
In the original code the layout is redefined in line 6 as GridLayout(2,1). It means a Gridlayout with 2 rows and 1 column. The system always treats the latest layout defined as the current one and hence U see an output defined in D. So line 2 has no effect on the code ans is as good as commenting it out.
If U comment out line 6, the Gridlayout defined in line 2 with 1 row and 3 columns takes effect and the result is obviously different because of different rows and columns. The third column is unused and hence the two buttons do not fill out the entire frame.
Remember the latest Layout definition is the one that is used prior to adding of the components.
regds
Ajay Kumar