Results 1 to 3 of 3
hi all
i am doing gtk application (gui)
for this am using gtkrc file..
in my gtk application, there are 4 buttons
so i included pixmap in gtkrc file...
but ...
- 10-26-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
gtk question
hi all
i am doing gtk application (gui)
for this am using gtkrc file..
in my gtk application, there are 4 buttons
so i included pixmap in gtkrc file...
but all the four button getting the pixmap..
i would like to use deferent pixmaps to each button..
is it poosible
please help me
thank you in advance"Relationships are built on trust and communication"
- 10-26-2007 #2
You don't make it clear whether you are actually writing this program yourself. If you are, why not just create four pixmaps and put each one on its appropriate button using the gtk_container_add function?
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 10-27-2007 #3Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
yes u r correct...
but.. there is a problem with gtk container add.
there are 4 stages to the button.
NORMAL
ACTIVE
PRELIGHT
INSENSITIVE
if we add pixmap directly to the button
in the above cases the button fails to show the pixmap
so that i used gtkrc file...
in this case all the buttons of the widget shows "butt.png" only...style "button"
{
#bg[NORMAL] = "#909090"
engine "pixmap"
{
image
{
function = BOX
recolorable = TRUE
state = NORMAL
detail = "pixmaps/butt.png"
shadow = IN
file = "pixmaps/butt.png"
border = { 9, 9, 9, 9 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = NORMAL
shadow = OUT
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = PRELIGHT
shadow = OUT
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = NORMAL
shadow = IN
file = "pixmaps/butt.png"
border = { 2, 2, 2, 2 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = INSENSITIVE
shadow = IN
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = INSENSITIVE
shadow = OUT
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = SELECTED
shadow = IN
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
image
{
function = BOX
recolorable = TRUE
state = ACTIVE
shadow = IN
file = "pixmaps/butt.png"
border = { 3, 3, 3, 3 }
stretch = TRUE
}
}
}
class "GtkButton" style "button"
my question is
i would like to show deferent pixmaps to the deferent buttons..
please help me
thank you in advance"Relationships are built on trust and communication"


Reply With Quote
