Page 382 - MDP2020-1
P. 382

|    인천전자마이스터고등학교  ·············································································································
            376



                    item_index  =  Label(win,  text  =  str(i));
                    item_index.grid(row=i+2,column=0)



                    item_name  =  Label(win,  text  =  "      item"  +  str(i));
                    item_name.grid(row=i+2,column=1)


                    item_price  =  Label(win,  text  =  "      price"  +  str(i));

                    item_price.grid(row=i+2,column=3)


                    i+=1
                    Combx.current(0)


            #  상품  삭제하는  함수

            def  delete():
                    global  i
                    if(i>0):
                            empty  =  Label(win,  text="                            ")

                            empty.grid(row=i+1,column=0)


                            empty  =  Label(win,  text="                            ")
                            empty.grid(row=i+1,column=1)


                            empty  =  Label(win,  text="                            ")

                            empty.grid(row=i+1,column=2)


                            empty  =  Label(win,  text="                            ")
                            empty.grid(row=i+1,column=3)



                            empty  =  Label(win,  text="                            ")
                            empty.grid(row=i+1,column=4)


                            i-=1


            #  개수  콤보박스  선택  이벤트
            def  combo_selection(self):
                    global  i
                    item_quantity  =  Label(win,  text=Combx.get())
                    item_quantity.grid(row=i+1,  column=2,  padx=10,  pady=2)



                    item_sumPrice  =  Label(win,  text=  "price"  +  str(i-1)  +  "  *  "  +  Combx.get())
   377   378   379   380   381   382   383   384   385   386   387