会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132413个问题
JAVA 全系列/第三阶段:数据库编程/Oracle 数据库的使用 10366楼

# coding=GBK
"""计算器软件界面的设计"""
from tkinter import *

class AppLication(Frame):
    '''创建一个App'''
    def __init__(self,master=None):
        super().__init__(master)
        self.master = master
        self.pack()
        self.createWidget()

    def createWidget(self):
        """通过gird实现计算器界面的展示"""
        btnText = (("MC","M+","M-","MR"),
                   ("C","±","/","×"),
                   (7,8,9,"-"),
                   (4,5,6,"+"),
                   (1,2,3,"="),
                   (0,"."))

        Entry(self).grid(row=0,column=0,columnspan=4,pady=10)

        for rindex,r in enumerate(btnText):
            for cindex,c in enumerate(r):
                if c == "0":
                    Button(self, text=c, width=2).grid(row=rindex + 1, column=cindex, columnspan=2,sticky=NSEW)
                elif c == "=":
                    Button(self, text=c, width=2).grid(row=rindex + 1, column=cindex, rowspan=2,sticky=NSEW)
                elif c == ".":
                    Button(self, text=c, width=2).grid(row=rindex + 1, column=cindex+1,sticky=NSEW)
                else:

                    Button(self,text=c,width=2).grid(row=rindex+1,column=cindex,sticky=NSEW)


if __name__=='__main__':
    root = Tk()
    root.geometry("200x260+800+600")
    app = AppLication(master=root)
    root.mainloop()


image.png



老师,我这个0的跨列跨不过去,您帮我看看是怎么回事?


Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 10367楼
Python 全系列/第七阶段:网页编程基础/CSS 样式 10368楼
WEB前端全系列/第十九阶段:Vue2知识体系(旧)/Vue基础知识 10370楼
Python 全系列/第二阶段:Python 深入与提高/游戏开发-坦克大战 10372楼
JAVA 全系列/第五阶段:JavaWeb开发/Servlet技术详解 10373楼

mapperdemo.zip

QQ截图20210307210326.png

找了好久也没发现错误,麻烦老师帮我看一下.

JAVA 全系列/第六阶段:项目管理与SSM框架/Mybatis 10376楼
Python 全系列/第十二阶段:Python_Django3框架/Django初级 10377楼
JAVA 全系列/第九阶段:权限控制与安全认证/Spring Security(旧) 10378楼

4.1.1BootStrap布局.zip

bootstrap-5.0.0-beta2-dist.zip

老师,我在官方下载的,在移动端不是100%,怎么回事?

WEB前端全系列/第四阶段:BootStrap框架模块/BootStrap4基础 10379楼
Python 全系列/第二阶段:Python 深入与提高/(旧)坦克大战 10380楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637