Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: random numbers, randint
Post: RE: random numbers, randint, SOLVED

(Nov-27-2023, 01:07 PM)deanhystad Wrote: It makes perfect sense to me hat or works. The and loops stops if either comparison is false. True and True == True, True and False == False, False and Tru...
janeik General Coding Help 2 590 Nov-27-2023, 05:17 PM
    Thread: random numbers, randint
Post: random numbers, randint

hello. I got what I want in excel but it fades away so I thought I shoul try Python to do following: Read 4 random numbers one by one, into a b c d until two conditions (a = 9 and b =20) is true. C...
janeik General Coding Help 2 590 Nov-27-2023, 12:46 AM
    Thread: pass a variable between tkinter and toplevel windows
Post: RE: pass a variable between tkinter and toplevel w...

After doing following, using variations in transparency between main window hosting a fixed tkinger mapview and a historical map imagefile, seemes to work as expected. SETTING TOPMOST TO FALSE IN MAI...
janeik GUI 10 2,511 Oct-05-2023, 04:22 AM
    Thread: pass a variable between tkinter and toplevel windows
Post: RE: pass a variable between tkinter and toplevel w...

(Oct-03-2023, 01:48 PM)deanhystad Wrote: I would do it like this: import tkinter as tk import customtkinter as ctk class OverlayWindow(tk.Toplevel): def __init__(self, overlay_file): s...
janeik GUI 10 2,511 Oct-05-2023, 03:44 AM
    Thread: neeed to activate a custom tk slider
Post: neeed to activate a custom tk slider

hello. At present time,I need to mouse click on the slider1 manually to activate it (to change transparency of a top level window. How do I activate it programmatically? I have tried to code slider1.s...
janeik GUI 1 880 Oct-05-2023, 03:34 AM
    Thread: pass a variable between tkinter and toplevel windows
Post: RE: pass a variable between tkinter and toplevel w...

(Oct-03-2023, 02:45 AM)janeik Wrote: Thanks for input. I found a solution and will post it soon. Used the callback and global variable var1,containing a filepath for an image to be shown on a label ...
janeik GUI 10 2,511 Oct-03-2023, 06:18 AM
    Thread: howto get size of a ctk image?
Post: RE: howto get size of a ctk image?

(Oct-03-2023, 03:33 AM)deanhystad Wrote: "size". my_image.cget("size") returns the size attribute (width, height) of one of the images. The light and dark images have to be the same size, so it do...
janeik General Coding Help 2 918 Oct-03-2023, 03:49 AM
    Thread: howto get size of a ctk image?
Post: howto get size of a ctk image?

hi, I have a CTkImage that needs heigth and width size of image. Guess I have to use cget but doesnt find parameters. my_image.cget(?,?) Anyone? my_image = customtkinter.CTkImage(light_image=Image.op...
janeik General Coding Help 2 918 Oct-03-2023, 02:56 AM
    Thread: pass a variable between tkinter and toplevel windows
Post: RE: pass a variable between tkinter and toplevel w...

Thanks for input. I found a solution and will post it soon.
janeik GUI 10 2,511 Oct-03-2023, 02:45 AM
    Thread: pass a variable between tkinter and toplevel windows
Post: pass a variable between tkinter and toplevel windo...

hello. I have 2 windows: a)window = tkinter.Tk(), a mapview and an Entry to write a filepath b)top=Toplevel() and a label to view an image I need to pass a dynamic variable (full filepath.i.e.: "d:/...
janeik GUI 10 2,511 Oct-02-2023, 02:03 AM
    Thread: Sending data from the form to DB
Post: RE: Sending data from the form to DB

(Sep-22-2023, 05:40 PM)quisatz Wrote: Good morning. One of the last stages of my project is a form selected from the menu - a program written in tkinter. The form has three fields: name, email, com...
janeik General Coding Help 5 1,394 Sep-24-2023, 10:42 PM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: RE: combobox_callback(choice choice part of openfi...

Needed 3 custom CTk comboboxes with values showing Countries, Counties and municipalities. Goal: Write a code in Python without notice of dirty coding. All the dirt is on my behalf. After selecting c...
janeik General Coding Help 9 1,532 Sep-10-2023, 10:27 PM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: RE: combobox_callback(choice choice part of openfi...

(Sep-05-2023, 07:32 PM)deanhystad Wrote: Your code has print statements. Why don't we get to see what is printed? Is it top secret? Why are your writing files here? 'd:/python311/userfiles/.txt'...
janeik General Coding Help 9 1,532 Sep-07-2023, 06:24 AM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: RE: combobox_callback(choice choice part of openfi...

(Sep-05-2023, 07:32 PM)deanhystad Wrote: Your code has print statements. Why don't we get to see what is printed? Is it top secret? Why are your writing files here? 'd:/python311/userfiles/.txt'...
janeik General Coding Help 9 1,532 Sep-06-2023, 10:00 PM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: RE: combobox_callback(choice choice part of openfi...

(Sep-05-2023, 07:32 PM)deanhystad Wrote: Your code has print statements. Why don't we get to see what is printed? Is it top secret? Why are your writing files here? 'd:/python311/userfiles/.txt'...
janeik General Coding Help 9 1,532 Sep-06-2023, 04:08 PM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: RE: combobox_callback(choice choice part of openfi...

hi, Regarding prints: 1) print("combobox dropdown clicked:", choice) choice has name of dropdown clicked. ie:Akershus Akershus is the name of textfile I try to build a full path for opening and readi...
janeik General Coding Help 9 1,532 Sep-05-2023, 09:27 PM
    Thread: combobox_callback(choice choice part of openfile name (kind of dependency)
Post: combobox_callback(choice choice part of openfile n...

hello. Goal is: clicking i.e: Akershus in a not placed colmbobox, fills another combo using content of a placed combobox. (kind of dependency) Trying to use choice building file (path AND filename. Th...
janeik General Coding Help 9 1,532 Sep-05-2023, 07:00 PM
    Thread: encode/decode to show correct country letters in a CTk combobox
Post: RE: encode/decode to show correct country letters ...

(Sep-02-2023, 04:35 AM)deanhystad Wrote: text = bytes([115, 195, 184, 114, 45, 116, 114, 195, 184, 110, 100, 101, 108, 97, 103]) print(str(text.decode("latin1"))) print(str(text.decode("utf8")))Outp...
janeik General Coding Help 2 750 Sep-02-2023, 09:46 AM
    Thread: encode/decode to show correct country letters in a CTk combobox
Post: encode/decode to show correct country letters in a...

hi. I have a text file encoded utf-8 Reading it with i.e. notepad shows "sør-trøndelag" Note the Norwegian character "ø" Binary reading in Python, from txtfile utf-8 encoded, shows: "115 195 184 114 ...
janeik General Coding Help 2 750 Sep-02-2023, 02:03 AM
    Thread: textfile to customtkinter combobox
Post: RE: textfile to customtkinter combobox

(Aug-30-2023, 03:43 PM)menator01 Wrote: One way import tkinter as tk from tkinter import ttk import os path = os.path.dirname(os.sys.argv[0]) if not path: path = '.' file = f'{path}/country....
janeik General Coding Help 6 1,836 Aug-31-2023, 12:27 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020