Thanks Przemek, I'm so happy for the quick reply. So it depends on the
terminal configuration, right? I will try to find out the right
configuration to make it work, because my app looks less-beautifull
without bright backgrounds :)


On Thu, 2009-12-17 at 04:56 +0100, Przemysław Czerpak wrote:
> On Thu, 17 Dec 2009, Agustianes Umbara Suwardi wrote:
> 
> Hi,
> 
> > I wrote this code:
> > function main()
> >     *- Bright background
> >     SetBlink(.f.)
> >     clear
> >     *- Fore: white, back: bright blue
> >     SetColor('W*/B')
> >     ? 'Text 1'
> >     *- Fore: white, back: blue
> >     SetColor('W/B')
> >     ? 'Text2'
> > return nil
> > When I run it on Linux, the asterisk ('*') doesn't give any effect.
> 
> Yes it is. In terminal GTs like GTTRM, GTCRS or GTSLN
>    SetBlink(.f.)
> disable using BLINK attribute in output so '*' in color strings
> has no effect.
> 
> > I read on xHarbour guide that when we SetBlink() to .f. the asterisk
> > effect is bright background.
> 
> Some descriptions in xHarbour guide are not precise enough.
> Above it's standard Clipper behavior which works in programs
> having direct access to video adapter registers. In [x]Harbour
> only GTDOS has direct access to hardware and works exactly in
> such way. In graphics GTs like GTXWC or GTWVT SetBlink() settings
> are ignored and these GTs always highlight background color when
> '*' is used in color strings and as I said in remote terminal GTs
> (GTTRM, GTCRS or GTSLN) SetBlink(.f.) only disable using blink
> attribute. GTWIN ignores this setting and the final behavior
> depends on MS-Windows (in window mode it highlights background
> and in full screen mode it depends on the video adapter registers
> initialized by Windows for full screen text output. In OS2 there
> is special system API call which allow to control it in console
> window and GTOS2 uses it so it works like GTDOS (and Clipper)
> just like described in xHarbour guide.
> 
> > I tried the code on several terminal
> > emulators, and the result is:
> > Terminal Emulator       SetBlink(.t.)        SetBlink(.f.)
> > ----------------------------------------------------------
> > gnome-terminal          no-effect            no-effect
> > xterm                   blinking             no-effect
> > rxvt                    bright-background &  no-effect
> >                         bright-text
> > linux-console           blinking             no-effect
> >
> > I'm using Harbour 1.1.0-dev-nightlybuild. Is there any workaround on the
> > code or settings on the terminal to have a bright background?
> 
> There is no standard way to control remotely the behavior of BLINK
> attribute in different terminals. From popular terminals only
> PuTTY/PTerm (PTerm is stand alone terminal in *nix PuTTY ports)
> has escape sequence to control its behavior remotely. Some very
> old hardware terminals dedicated for SCO systems also had some
> escape sequences which allows to switch the blink bit in used
> hardware but it's not portable solution and termcap or terminfo
> do not have any entries for it so it can be only hardcoded inside
> the code and activated when type of remote terminal is well known
> (TERM envvar is not enough here). If you are using PuTTY (or PTerm)
> then you can use:
>    fwrite( 1, chr( 27 ) + "[=0E" )  /* disable blinking, highlight bkg */
>    fwrite( 1, chr( 27 ) + "[=1E" )  /* enable blinking */
> in your code.
> Anyhow in many terminals the behavior of BLINK attribute can be
> changed on user side. Just look at configuration switches.
> In Linux console if you are using frame buffer then BLINK attr
> always highlights bkg color. If you are using pure VGA text mode
> then it can be changed by some programs with root privileges which
> can switch blink bit in hardware video adapter registers, i.e.
> SVGATextMode has an option to control it (look for 'option "16color"'
> in configuration file).
> 
> > (Sorry for my English)
> 
> it's perfect for me and for sure not worse then mine.
> 
> best regards,
> Przemek
> _______________________________________________
> Harbour-users mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour-users

_______________________________________________
Harbour-users mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour-users

Reply via email to