how to modify the color of background of AXIS

More
04 Aug 2016 02:46 #78342 by chuchengbing
Hello everyone.
Now I want to make some changes on AXIS gui. I have changed something by modify the axis.tcl and axis.py files. But I can not change the background color of the axis gui, which is always grey, including when start the linuxcnc, there is a configuration selector which let you to choose which configuration you have done will be loaded. I find that it is not a easy work to change this background color too. I am new in python. So, it is better someone will give me clues. thanks very much...

Please Log in or Create an account to join the conversation.

More
04 Aug 2016 14:49 - 04 Aug 2016 14:53 #78360 by loboy
Hello chuchengbing,

To change the background color of elements in the Axis GUI, I would take a look at "frame" widgets in the axis.tcl file. The frame widget is used to group things together in a box. You will have to add a color attribute to these.

The first one you can specifically look at is on LINE 469:
frame .toolbar \
	-borderwidth 1 \
	-relief raised \
        -background "green"

Replace it with the color of your choosing... You can also use hexidecimal color values.
There are many other frame widgets which you may have to add a background color attribute. Hopefully this gets you pointed in the right direction.

I am not sure of what you mean by the "configuration selector" ?
Last edit: 04 Aug 2016 14:53 by loboy.
The following user(s) said Thank You: chuchengbing

Please Log in or Create an account to join the conversation.

More
05 Aug 2016 01:09 #78375 by chuchengbing
Thanks loboy.
yes,you are right, I have done something like you told and it really changed some color of frame. but what i want to change is the color of the whole axis gui. I am not sure you will understand me. anyway, thanks very much!!

Please Log in or Create an account to join the conversation.

More
05 Aug 2016 15:55 #78391 by loboy
As I stated before, you will have to add color attributes to multiple widget elements. The entire background is not controlled by a single widget element, it is composed of multiple frame boxes (sometimes nested) all of which need color attributes. The grey that you are seeing is the default color Tcl uses when no color attribute is assigned.

For example there is another frame widget at LINE 810, another at LINE 863, 899... etc.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum