Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Background color of scilab window

1,564 views
Skip to first unread message

siddarth varanasi

unread,
Jul 14, 2004, 1:54:49 PM7/14/04
to
hi,
could any one tell me how to change the background color in
the scilab main window and the editor window ...
white is prooving too harsh for my eyes , i would like to turn
it to grey...
i am using scilab-3.0

bye
sid

François Vogel

unread,
Jul 14, 2004, 4:38:32 PM7/14/04
to
Hi,

For the main Scilab window, I don't think it is possible without
recompilation.

For the Scipad editor :
We (Enrico and I) did not implement any way to change the background color
of the pad. Maybe it could be done as part of a preferences menu. Let's put
this request on the Scipad wish list.

In the meantime, since Scipad is written in TCL/TK, which is an interpreted
language, you have a very simple way to do it:

1. Open the (text) file SCI/tcl/scipadsources/mainwindow.tcl, where SCI is
the root directory where you installed Scilab-3.0.

2. Look for the line:
text $pad.textarea -relief sunken -bd 2 -xscrollcommand "$pad.xscroll set" \
-yscrollcommand "$pad.yscroll set" -wrap $wordWrap -width 1 -height 1 \
-fg $FGCOLOR -bg $BGCOLOR -setgrid 1 -font $textFont -tabs $taille
\
-insertwidth 3 -insertborderwidth 2 -insertbackground $CURCOLOR \
-selectbackground $SELCOLOR -exportselection 1
Note this is a single continued line (there are antislashes at the end of
the text lines).
This line should be close to line 75 in the file.

3. At the very end of this line, i.e. just after -exportselection 1, add
" -background grey75", without the quotes.

4. Save and close the file.

5. Relaunch Scipad

That's all!

If grey75 does not satisfy you, try greyXX with XX being between 0 and 100.
The higher the number, the darker the backgound.

Note however that everything in Scipad has been implemented with the
implicit assumption that the background in white. For example I can think of
colorization schemes, that could turn out to be barely readable depending on
the backgound color you select.

HTH.
François


"siddarth varanasi" <varanasi...@gmail.com> a écrit dans le message de
news:9655057.04071...@posting.google.com...

siddarth varanasi

unread,
Jul 15, 2004, 12:10:30 AM7/15/04
to
thanks François that did it

sid

Enrico Segre

unread,
Jul 15, 2004, 2:48:12 AM7/15/04
to
On Wed, 14 Jul 2004 22:38:32 +0200, François Vogel wrote:

> 1. Open the (text) file SCI/tcl/scipadsources/mainwindow.tcl, where SCI is
> the root directory where you installed Scilab-3.0.
>
> 2. Look for the line:
> text $pad.textarea -relief sunken -bd 2 -xscrollcommand "$pad.xscroll set" \
> -yscrollcommand "$pad.yscroll set" -wrap $wordWrap -width 1 -height 1 \
> -fg $FGCOLOR -bg $BGCOLOR -setgrid 1 -font $textFont -tabs $taille

Francois,

why not rather (which is simpler and more consistent) setting BGCOLOR?
This is defined in scipadsources/defaults.tcl, but can be set from scilab
itself. Try

TK_EvalStr("scipad eval {set BGCOLOR grey75}")

As things are now, scipad needs to have been opened once, and the
change is effective only when scipad is reopened, but this can be
perfectioned. It could even be incorporated in the sciGUI function config().

Enrico

Jaime Urzua

unread,
Jul 15, 2004, 10:13:24 AM7/15/04
to
> TK_EvalStr("scipad eval {set BGCOLOR grey75}")
>
> As things are now, scipad needs to have been opened once, and the
> change is effective only when scipad is reopened, but this can be
> perfectioned. It could even be incorporated in the sciGUI function config().
>
> Enrico

It was done... I hope lauch the Revision 0.3 of sciGUI at the end of
this month with new features :)

Jaime Urzua

Enrico Segre

unread,
Jul 15, 2004, 10:31:32 AM7/15/04
to

Sounds nice...

Do you call a color picker for every configurable color (see
SCI/tcl/scipadsources/defaults.tcl)?

Do you remember to create the scipad interp if it doesn't exist, like in
SCI/macros/util/scipad.sci, so to avoid the above mentioned pb?

Are there plans to save the configuration across sessions?

Enrico

Jaime Urzua

unread,
Jul 15, 2004, 2:55:01 PM7/15/04
to
> Do you call a color picker for every configurable color (see
> SCI/tcl/scipadsources/defaults.tcl)?
>
> Do you remember to create the scipad interp if it doesn't exist, like in
> SCI/macros/util/scipad.sci, so to avoid the above mentioned pb?
>

I try get all "configurable" parameters in config() command. I think
it could be nice and more robust to me ...

> Are there plans to save the configuration across sessions?

yes, in the initialization file .scilab or scilab.ini

siddarth varanasi

unread,
Jul 15, 2004, 11:35:14 PM7/15/04
to
hi,

In scipad the cursor is little mysterious. it sometimes
appears and disapperars.. until u press some key u dont know where the
cursor is ....

is there some way to rectify this

bye
sid

François Vogel

unread,
Jul 16, 2004, 2:39:31 AM7/16/04
to
Hi,

What's your operating system?

I bet it's Linux.

What you describe is a known bug under Linux. At the time the Scipad 3.0
(the one included in Scilab 3.0) was issued, we tought the problem came from
the tcl version. Now we know that it is due to the OS rather than to the
tcl/tk version.

The workaround is to have the cursor always on (suppress the blinking) on
Linux. Blinking can be kept on Windows and Mac as no problem was reported
yet. The steps to follow are:

1. Open SCI/tl/scipadsources/mainwindow.tcl

2. Look for this piece of code:

if {[expr $tk_version] >= 8.4} {
$textareacur configure -insertofftime 500 -insertontime 500
} else {
$textareacur configure -insertofftime 0
}

3. Replace it by:

if {$tcl_platform(platform) != "unix"} {
$textareacur configure -insertofftime 500 -insertontime 500
} else {
$textareacur configure -insertofftime 0
}

4. Save, exit, and relaunch Scipad.

HTH.
François

"siddarth varanasi" <varanasi...@gmail.com> a écrit dans le message de
news:9655057.04071...@posting.google.com...

siddarth varanasi

unread,
Jul 16, 2004, 1:08:07 PM7/16/04
to
hi François,

u are a genius man, u guessed correctly... i have left
windows for good a few months back....
a small typo though:

> 1. Open SCI/tcl/scipadsources/mainwindow.tcl
^^^
---------------------------------------------------------------------
and finally i found a way to change the color of the scilab main
window...

open SCI/X11_defaults

on the 531 line u have

Xscilab.color*background:white

change it to the color u need...

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

now i need to find a way to change the backgound color of help window

thanks
sid

Enrico Segre

unread,
Jul 18, 2004, 4:20:17 AM7/18/04
to
On Thu, 15 Jul 2004 11:55:01 -0700, Jaime Urzua wrote:

>> Do you call a color picker for every configurable color (see
>> SCI/tcl/scipadsources/defaults.tcl)?
>>
>> Do you remember to create the scipad interp if it doesn't exist, like in
>> SCI/macros/util/scipad.sci, so to avoid the above mentioned pb?
>>
>
> I try get all "configurable" parameters in config() command. I think
> it could be nice and more robust to me ...

let us know if you have specific suggestions on what else/how to configure
for scipad. We can work it out on scipad side.

Enrico

0 new messages