The time now is Thu 21 Feb 2019, 16:49
All times are UTC - 4 |
Author |
Message |
arivas_2005
Joined: 25 Feb 2007 Posts: 202
|
Posted: Thu 25 Oct 2012, 18:13 Post subject:
gtkdialogs and colors |
|
I know very little programming
I want to learn about
in this code
Code: | #! /bin/bash
export MAIN_DIALOG='
<vbox>
<text>
<label>access to</label>
</text>
<entry>
<default>Default value</default>
<variable>ENTRY</variable>
</entry>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>
'
gtkdialog --program=MAIN_DIALOG
|
how I can put..
a) color in font: access to or Default value
b) color background in <text> and <entry>
c) alignment to center in <label>, <text> or <entry>
d) asign program1 to <button ok> and program2 to <button cancel>
I searched the internet but I'm very confused about how to use commands in gtkdialg
Thank you. though I know I ask many details, I wish I collaborate
regards
|
Back to top
|
|
 |
puppyluvr

Joined: 06 Jan 2008 Posts: 3486 Location: Chickasha Oklahoma
|
Posted: Thu 25 Oct 2012, 18:26 Post subject:
|
|
Hello,
I believe that those settings are global for gtkdialog, but dont hold me to that.. Ive done many gtkdialog programs, and never thought about colors..
I would tend to bet there is a gtk.rc type file that contains settings for default colors, fonts, etc...
Although I dont know the exact answer, I posted so I can follow this thread..because I WANT TO....
Thank you for asking...
_________________ Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!
Puppy since 2.15CE...
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 919
|
Posted: Thu 25 Oct 2012, 20:17 Post subject:
|
|
arivas_2005,
To make a very ugly example, here's how to create a temporary gtkrc file to control your program colors and execute programs.
Code: | #! /bin/bash
echo 'style "blackbg" {
font_name="DejaVu Sans 15"
bg[NORMAL] = "black"
fg[NORMAL] = "green"
base[NORMAL] = "yellow"
}
class "*" style "blackbg"' > /tmp/gtkrc
export GTK2_RC_FILES=/tmp/gtkrc:/root/.gtkrc-2.0
export MAIN_DIALOG='
<vbox>
<text>
<label>access to</label>
</text>
<entry>
<default>Default value</default>
<variable>ENTRY</variable>
</entry>
<hbox>
<button ok><action> echo program1</action><action>EXIT:ok</action></button>
<button cancel><action> echo program2</action><action>EXIT:cancel</action></button>
</hbox>
</vbox>
'
gtkdialog --program=MAIN_DIALOG |
There is a rich source of tips here-
http://murga-linux.com/puppy/viewtopic.php?t=38608
Cheers,
s
|
Back to top
|
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
[ Time: 0.0286s ][ Queries: 12 (0.0073s) ][ GZIP on ] |