Автоматическое определение пути к базе данных

Закончена работа над 1м окном
This commit is contained in:
danamir
2018-12-24 16:39:26 +03:00
parent ca1f945101
commit dfd0d77873
6 changed files with 69 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
import os
import tkinter as tk
import sys
import wx
def hex_to_rgb(value):
@@ -14,7 +14,7 @@ def setBacgroundColor():
"""
hex_color = "#DBF0B2"
color =hex_to_rgb(hex_color)
return color
def setBckgroundButtonColor():
@@ -27,25 +27,18 @@ def setBckgroundButtonColor():
color = hex_to_rgb(hex_color)
return color
def getFullPath(file):
put = os.getcwd()
path = str(put) + '\\' + file
return path
def setFrameSize():
"""
:parameter sh,sw - ширина и высота экрана, на котором
запускается программа
:return: w,h - размеры фрейма для отрисовки gui
"""
root = tk.Tk()
sw = root.winfo_screenwidth()
sh = root.winfo_screenheight()
w,h = int(0.75 * sw), int(0.75 * sh)
if w < 800 and h < 600:
w, h = 800, 600
def getSizeH():
app = wx.App(False)
sw, sh = wx.GetDisplaySize()
w = 0.75 * sw
h = 0.75 * sh
app.Destroy()
return w, h