Skip to main content

scrollbar doesn't fill or appear. tkinter

I'm having trouble with my scrollbar. I tried something but each time I had a little trouble. now I can't even see the scrollbar, other times it doesn't fill the y-axis. firstly I tried without canvas, just with frame (allTelemtry) for using grid() but couldn't achieve it then tried with canvas so I can use pack() but still can't do it properly.

from tkinter import *
from tkinter import ttk

root = Tk()
root.state('zoomed')

# creating notebook
telemetry = ttk.Notebook(root, width=1083, height=200)
telemetry.place(x=440, y=560)

allTelemetry = Frame(telemetry)
allTelemetry.pack(fill="both", expand = 1)

# creating canvas for scrollbar 
allTelemetryCanvas = Canvas(allTelemetry)
allTelemetryCanvas.pack(fill="both", expand = 1)

dotTelemetry = Frame(telemetry)
dotTelemetry.pack(fill="both", expand = 1)

telemetry.add(allTelemetry, text= u"Hepsini Goster")
telemetry.add(dotTelemetry, text= u"Anlik Telemetri")

#------------------------------------------------------------
teleTitle = [" ", "Takmno","Paketno","Zaman",
        "1Basn","2Basn",
        "Nem",
        "1kseklik","2Ykseklik",
        "rtifaFark","niHz","Scaklk","PilGerilimi",
        "La1","Lo1","Al1",
        "La2","Lo2","Al2",
        "Drm",
        "x","y","z",
        "DnSays","Video"]

empty = Label(allTelemetryCanvas, text="",width=3)
empty.grid(row=0,column=0,padx=1, pady=1)
for j in range(1,25):
    teleTitle[j] = teleTitle[j].encode('UTF-8')

    entry = Label(allTelemetryCanvas,text=teleTitle[j].decode(),anchor='w', width=5, bd=2)
    entry.grid(row=0, column=j,padx=1, pady=1)

packet=1
for i in range(1,10):
    packetNum = Label(allTelemetryCanvas, text = packet, anchor="w",width=3)
    packetNum.grid(row=i, column=0,pady=0.5)
    packet = packet+1
    for j in range(1,25):
        takenData = Entry(allTelemetryCanvas,width=5)
        takenData.grid(row=i, column=j,pady=0.5)

# !!!!!!!!!!!!!!!!!
scrollbar = ttk.Scrollbar(allTelemetry, orient='vertical', command=allTelemetryCanvas.yview)
scrollbar.pack(side=RIGHT, fill="y")
allTelemetryCanvas['yscrollcommand'] = scrollbar.set


root.mainloop()


source https://stackoverflow.com/questions/72664385/scrollbar-doesnt-fill-or-appear-tkinter

Comments

Popular posts from this blog

How to show number of registered users in Laravel based on usertype?

i'm trying to display data from the database in the admin dashboard i used this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count(); echo $users; ?> and i have successfully get the correct data from the database but what if i want to display a specific data for example in this user table there is "usertype" that specify if the user is normal user or admin i want to user the same code above but to display a specific usertype i tried this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count()->WHERE usertype =admin; echo $users; ?> but it didn't work, what am i doing wrong? source https://stackoverflow.com/questions/68199726/how-to-show-number-of-registered-users-in-laravel-based-on-usertype

Why is my reports service not connecting?

I am trying to pull some data from a Postgres database using Node.js and node-postures but I can't figure out why my service isn't connecting. my routes/index.js file: const express = require('express'); const router = express.Router(); const ordersCountController = require('../controllers/ordersCountController'); const ordersController = require('../controllers/ordersController'); const weeklyReportsController = require('../controllers/weeklyReportsController'); router.get('/orders_count', ordersCountController); router.get('/orders', ordersController); router.get('/weekly_reports', weeklyReportsController); module.exports = router; My controllers/weeklyReportsController.js file: const weeklyReportsService = require('../services/weeklyReportsService'); const weeklyReportsController = async (req, res) => { try { const data = await weeklyReportsService; res.json({data}) console

How to split a rinex file if I need 24 hours data

Trying to divide rinex file using the command gfzrnx but getting this error. While doing that getting this error msg 'gfzrnx' is not recognized as an internal or external command Trying to split rinex file using the command gfzrnx. also install'gfzrnx'. my doubt is I need to run this program in 'gfzrnx' or in 'cmdprompt'. I am expecting a rinex file with 24 hrs or 1 day data.I Have 48 hrs data in RINEX format. Please help me to solve this issue. source https://stackoverflow.com/questions/75385367/how-to-split-a-rinex-file-if-i-need-24-hours-data