Message Box Colors 
Author Message
 Message Box Colors

Hi,

Is there a way to configure the buttons on the Message Box widget.  I
would like to manipulate their colors.  Looks to me the only thing I can
set is background and foreground.  I would also like to set the
activebackground and highlightbackground as well.  Any ideas?

Jeremy



Fri, 23 Aug 2002 03:00:00 GMT  
 Message Box Colors
Jeremy Salsman schrieb:

Quote:
> Hi,

> Is there a way to configure the buttons on the Message Box widget.  I
> would like to manipulate their colors.  Looks to me the only thing I can
> set is background and foreground.  I would also like to set the
> activebackground and highlightbackground as well.  Any ideas?

> Jeremy

Look into the source of the *.pm file, espacially the Populate()-function.
You will find there what widgets are created and under what name
they are advertised. When you know that name you can get direct access to
them by using the Subwidget()-method.

F. ex.

$dlg->Subwidget('button')->configure(-background=>'white');

Ciao, thomas.

--
----------------------------------------------------
Thomas Schmickl,
Department for zoology
Karl Franzens University Graz, Austria.
----------------------------------------------------
Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

----------------------------------------------------



Sat, 24 Aug 2002 03:00:00 GMT  
 Message Box Colors

Hello,

Sorry, I should have made my question clearer.  The message box buttons are
not advertised in the MsgBox.pm file.  Nor are they advertised up the line of
base classes.  (Dialog.pm, DialogBox.pm).  The DialogBox.pm has an "add"
function which looks like it should do the advertising for all its derived
classes.  However, the add function isn't called anywhere I can see.

So my question restated is:  I there a way to configure the buttons on the
Message Box widget if the buttons are not advertised?  What will it take to
get them advertised? or Are they already advertised somewhere, and I just
don't see it?  Any help is appreciated.  Thanks!

Jeremy

Quote:
> Jeremy Salsman schrieb:

> > Hi,

> > Is there a way to configure the buttons on the Message Box widget.  I
> > would like to manipulate their colors.  Looks to me the only thing I can
> > set is background and foreground.  I would also like to set the
> > activebackground and highlightbackground as well.  Any ideas?

> > Jeremy

> Look into the source of the *.pm file, espacially the Populate()-function.
> You will find there what widgets are created and under what name
> they are advertised. When you know that name you can get direct access to
> them by using the Subwidget()-method.

> F. ex.

> $dlg->Subwidget('button')->configure(-background=>'white');

> Ciao, thomas.

> --
> ----------------------------------------------------
> Thomas Schmickl,
> Department for zoology
> Karl Franzens University Graz, Austria.
> ----------------------------------------------------
> Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

> ----------------------------------------------------

--
Jeremy Salsman -- Verification Technology
Office:  040-3 / C301
Phone: (507) 253-0779 T/L: 8-553-0779



Sat, 24 Aug 2002 03:00:00 GMT  
 Message Box Colors

Quote:

> Hello,
> Sorry, I should have made my question clearer.  The message box buttons are
> not advertised in the MsgBox.pm file.  Nor are they advertised up the line of

1) MsgBox.pm is not used by any part of Tk - it should be removed.

Quote:
> base classes.  (Dialog.pm, DialogBox.pm).  The DialogBox.pm has an "add"
> function which looks like it should do the advertising for all its derived
> classes.  However, the add function isn't called anywhere I can see.
> So my question restated is:  I there a way to configure the buttons on the
> Message Box widget if the buttons are not advertised?  What will it take to
> get them advertised? or Are they already advertised somewhere, and I just
> don't see it?  Any help is appreciated.  Thanks!

2) No. A messageBox is created on-the-fly and is a once-and-done thing.

3) Use a Dialog or DialogBox.  Create it and configure it during preset
and use it when required.

hth

Quote:
> Jeremy
>> Jeremy Salsman schrieb:

>> > Hi,

>> > Is there a way to configure the buttons on the Message Box widget.  I
>> > would like to manipulate their colors.  Looks to me the only thing I can
>> > set is background and foreground.  I would also like to set the
>> > activebackground and highlightbackground as well.  Any ideas?

>> > Jeremy

>> Look into the source of the *.pm file, espacially the Populate()-function.
>> You will find there what widgets are created and under what name
>> they are advertised. When you know that name you can get direct access to
>> them by using the Subwidget()-method.

>> F. ex.

>> $dlg->Subwidget('button')->configure(-background=>'white');

>> Ciao, thomas.

>> --
>> ----------------------------------------------------
>> Thomas Schmickl,
>> Department for zoology
>> Karl Franzens University Graz, Austria.
>> ----------------------------------------------------
>> Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

>> ----------------------------------------------------
> --
> Jeremy Salsman -- Verification Technology
> Office:  040-3 / C301
> Phone: (507) 253-0779 T/L: 8-553-0779


--
--

Lehigh University Computing Center, USA


Sun, 25 Aug 2002 03:00:00 GMT  
 Message Box Colors
Jeremy Salsman schrieb:

Quote:
> Hello,

> Sorry, I should have made my question clearer.  The message box
> buttons are not advertised in the MsgBox.pm file.  Nor are they
> advertised up the line of base classes.  (Dialog.pm, DialogBox.pm).
> The DialogBox.pm has an "add" function which looks like it should do
> the advertising for all its derived classes.  However, the add
> function isn't called anywhere I can see.

> So my question restated is:  I there a way to configure the buttons on
> the Message Box widget if the buttons are not advertised?  What will
> it take to get them advertised? or Are they already advertised
> somewhere, and I just don't see it?  Any help is appreciated.  Thanks!

In my "DialogBox.pm" ($VERSION = '3.029') there are the following lines
(linenumber 44 - 45) that do create the buttons and advertise them with
a "B_" as a name-prefix:

 my $b = $bot->Button(-text => $bl, -command => sub {
$cw->{'selected_button'} = "$bl" } );
 $cw->Advertise("B_$bl" => $b);

This should be the names to get access to them by calling the
Subwidget() method.

Ciao, thomas.

----------------------------------------------------
Thomas Schmickl,
Department for zoology
Karl Franzens University Graz, Austria.
----------------------------------------------------
Visit the GPL e:doc-project on http://members.magnet.at/hfbuch/edoc

----------------------------------------------------



Sun, 25 Aug 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Colored items in a list box.

2. Changing cursor color in text box?

3. color editor error message

4. using Mail::Box to read multipart messages

5. script error sent to the message box?

6. using Mail::Box to read multipart messages

7. message and dialog boxes.

8. message box in Tk

9. Toplevel dialog boxes and Messages

10. Message Box

11. Message box won't return a value

12. Message box now returning value

 

 
Powered by phpBB® Forum Software