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 Thu 02 Oct 2014, 00:47
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 Posts_count  
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: 3203
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_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0491s ][ Queries: 12 (0.0071s) ][ GZIP on ]