Changing the title bar color of tkinter windows

Поделиться
HTML-код
  • Опубликовано: 8 июл 2024
  • This video covers how to change the title bar cover of apps in tkinter.

Комментарии • 26

  • @FeyzSHB
    @FeyzSHB Год назад +2

    Super gemacht! Wir brauchen mehr advanced Videos über Ctk. Danke dir!

  • @qeq167
    @qeq167 9 месяцев назад

    thank you i have been looking for a solution for many days

  • @sarthaksingh7570
    @sarthaksingh7570 Год назад +1

    This was the video that I have been searching for over a month... But I found none...
    Thank u very much for this video...😅😅😅🤗🤗🤗

  • @lega_pugliese
    @lega_pugliese 2 месяца назад

    thanks a lot for sharing this

  • @Knight_Sky35
    @Knight_Sky35 Год назад

    Hello, can you make a video about switching frames in tkinter?

  • @user-wg9ed1nj6b
    @user-wg9ed1nj6b Год назад +2

    Can anyone confirm if DwmSetWindowAttribute is only usable in windows 11?

  • @Saucehero29
    @Saucehero29 9 месяцев назад

    how to create new window in custom tkinter and and the new window has the same style with the first window?

  • @akash604
    @akash604 Год назад

    Please do more videos on customtkinter animation !!

  • @sarthaksingh7570
    @sarthaksingh7570 Год назад

    Actually i was making a scrollable frame in custom tkinter to make chat bot but when I added any message it does not scroll the frame automatically...
    Pls help me...

  • @user-wg9ed1nj6b
    @user-wg9ed1nj6b Год назад +2

    it doesn't works on me, I can't figure out the problem...

    • @MrMoon-hy6pn
      @MrMoon-hy6pn 10 месяцев назад +1

      Looking at the DWM documentation I think setting the border colour (and a few other things) using DwmSetWindowAttribute isn't supported in windows 10, only windows 11 from build 22000 onwards. If you are using windows 10 like I am it may be the issue unfortunately. It's weird that it just quitely fails for me, with no sort of warning in the python console.

    • @JimmySquiky
      @JimmySquiky 3 месяца назад

      @@MrMoon-hy6pn Doesn't work for me too. I'm also using windows 10, version 19045.4046

  • @btngana2077
    @btngana2077 9 месяцев назад +2

    sadly only works on windows 11

  • @heyyounotyouyou3761
    @heyyounotyouyou3761 Год назад

    You are a good content creator but there just aren't many people using tkinter. You have to expand your horizons it you really wanna grow

  • @__Merchant
    @__Merchant 14 дней назад

    Or make a fake title bar which takes less time to figure out.

  • @ranyanuka4490
    @ranyanuka4490 8 месяцев назад

    isn't this a clear code video?

  • @it_is_random
    @it_is_random 7 месяцев назад +1

    Please someone help me the code doesn''t work:
    import customtkinter as ctk
    from ctypes import windll, byref, sizeof, c_int
    window = ctk.CTk(fg_color="#FF0000")
    window.geometry("800x500")
    HWND = windll.user32.GetParent(window.winfo_id())
    title_bar_colour = 0x00FF0000
    windll.dwmapi.DwmSetWindowAttribute(HWND, 36, byref(c_int(title_bar_colour)), sizeof(c_int))
    window.mainloop()

    • @BunnitownMain
      @BunnitownMain 2 месяца назад

      maybe its because it only works on windows 11+

    • @it_is_random
      @it_is_random 2 месяца назад

      @@BunnitownMain Yeah fixed it.
      my one is cross platform works everywhere
      I mean in all windows.

    • @itallocortez
      @itallocortez 2 месяца назад

      @@it_is_random How did you make it work? >

    • @it_is_random
      @it_is_random 2 месяца назад

      @@itallocortez
      import ctypes as ct
      from tkinter import *
      root = Tk()
      root.update()
      root.iconify()
      DWWMA_USE_IMMERSIVE_DARK_MODE = 20
      set_window_attribute = ct.windll.dwmapi.DwmSetWindowAttribute
      get_parent = ct.windll.user32.GetParent
      hwnd = get_parent(root.winfo_id())
      renduring_policy = DWWMA_USE_IMMERSIVE_DARK_MODE
      value = 1
      value = ct.c_int(value)
      set_window_attribute(hwnd, renduring_policy, ct.byref(value), ct.sizeof(value))
      root.update_idletasks()
      root.deiconify()
      root.mainloop()

    • @synchrom7502
      @synchrom7502 2 месяца назад

      @@it_is_random bro say please, how did you fix this??? please)