Skip to content

Instantly share code, notes, and snippets.

View MikeTheWatchGuy's full-sized avatar
♥️
Love making NEW things, not copying others... try it, it's much more fun!

MikeTheWatchGuy MikeTheWatchGuy

♥️
Love making NEW things, not copying others... try it, it's much more fun!
View GitHub Profile
@MikeTheWatchGuy
MikeTheWatchGuy / gist:233911fa1fc3cb6f028086a4209e6519
Created December 3, 2018 21:56 — forked from tshirtman/gist:791495591bd3a7a3f8807211b220233b
windows specific whole application opacity management
def _get_opacity(self):
if platform == 'win':
try:
return winxpgui.GetLayeredWindowAttributes(HWND)[1] / 255.
except Exception as e:
Logger.error(
'failed to get opacity: {}'.format(e))
else:
Logger.warning(
@MikeTheWatchGuy
MikeTheWatchGuy / scrframe.py
Created September 17, 2018 20:21
TKinter scrollable frame
#!/usr/bin/python
# -*- coding: utf-8 -*-
from Tkinter import * # from x import * is bad practice
from ttk import *
# http://tkinter.unpythonic.net/wiki/VerticalScrolledFrame
class VerticalScrolledFrame(Frame):
"""A pure Tkinter scrollable frame that actually works!
* Use the 'interior' attribute to place widgets inside the scrollable frame