-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcls_Frm_AccStatus.py
More file actions
58 lines (45 loc) · 1.37 KB
/
cls_Frm_AccStatus.py
File metadata and controls
58 lines (45 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python3
############################################
#### cls_Frm_AccStatus.py ####
#### Version 20250506 grid ####
############################################
import tkinter as tk
import json
import myTheme as skin
from myTable import TkTable as AccStatTbl
class AccountStatusFrame( tk.Frame ):
def __init__(
self,
master = None,
accDataArr = [ ( "AccountInfo", ) ],
dimensions = [ 600, 400 ]
):
super().__init__( master )
self.master = master
self.grid()
# print(f"AccountStatusFrame called with\n--dimensions: { dimensions }\n--accDataArr: { json.dumps( accDataArr, indent=4) }")
self.accStatTnnlData = accDataArr
self.accStatFrmGrid = tk.Frame(
self,
bg = skin.myBlack,
padx = 10,
pady = 10,
width = int(dimensions[0] * 0.95 )
)
passOnData = []
if ( len( self.accStatTnnlData ) == 1 ):
passOnData = self.accStatTnnlData
elif( len( self.accStatTnnlData ) == 0 ):
passOnData = ["No data"]
else:
passOnData = self.accStatTnnlData[1:]
# to display 'tabAccTnnlData'
self.tabAccStatusFrm = AccStatTbl(
self.accStatFrmGrid,
title = "Nord VPN Account",
colHeaders = [],
data = passOnData,
dimensions = [ max( dimensions[0], 600 ), min( dimensions[0], 400 ) ]
)
self.tabAccStatusFrm.grid( row = 0, column = 0 )
self.accStatFrmGrid.grid( row = 0, column = 0 )