Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Jul 2014, 22:26
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
gtkdialogs and colors
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
arivas_2005

Joined: 25 Feb 2007
Posts: 89

PostPosted: 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
View user's profile Send private message 
puppyluvr


Joined: 06 Jan 2008
Posts: 3183
Location: Chickasha Oklahoma

PostPosted: Thu 25 Oct 2012, 18:26    Post subject:  

Very Happy 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... Cool

_________________
Close the Windows, and open your eyes, to a whole new world
http://puppylinuxstuff.meownplanet.net/puppyluvr/
Puppy Linux Users Group on Facebook

Puppy since 2.15CE...
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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.0446s ][ Queries: 12 (0.0032s) ][ GZIP on ]