Selected text color in HAL_SpinButton
18 Sep 2020 10:07 #182626
by aekhv
Selected text color in HAL_SpinButton was created by aekhv
Attachments:
Please Log in or Create an account to join the conversation.
20 Sep 2020 10:34 #182865
by aekhv
Replied by aekhv on topic Selected text color in HAL_SpinButton
Finally solved!
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import gtk
import linuxcnc
def __init__(self, halcomp, builder, useropts):
self.builder = builder
spinbtn = self.builder.get_object('spinbutton1')
# Border
spinbtn.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("black"))
spinbtn.modify_bg(gtk.STATE_INSENSITIVE, gtk.gdk.color_parse("black"))
# Up/down arrows
spinbtn.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#00ff00"))
spinbtn.modify_fg(gtk.STATE_INSENSITIVE, gtk.gdk.color_parse("red"))
# Selected text background
spinbtn.modify_base(gtk.STATE_ACTIVE, gtk.gdk.color_parse("blue"))
# Selected text
spinbtn.modify_text(gtk.STATE_ACTIVE, gtk.gdk.color_parse("white"))
def get_handlers(halcomp, builder, useropts):
return [HandlerClass(halcomp, builder, useropts)]
Attachments:
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
21 Sep 2020 00:05 #182992
by cmorley
Replied by cmorley on topic Selected text color in HAL_SpinButton
You should be able to do this by using a modified theme too.
Some where on the forum was some question about themes for gscreen.
The solutions should be similar for gmoccapy
Some where on the forum was some question about themes for gscreen.
The solutions should be similar for gmoccapy
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.101 seconds