1. [WIN] Win32lib v0.55 RText problem

Hi all,

Recently switched from using Win32lib v.50 to v.55 to be able to use doEvent().

The background color of the RText control is now a shaded gray, whereas in v.
0.50
it took the background color of the window in which it exists. I much prefer the
v .50 appearance (i.e., RText having the background color of its window).

Here's the line in question:

Label1  = create( RText, "Enter earliest YEAR to process",  ChildWin, 18,  30,
250, 20, 0 ),

I suspect that the very last parameter (0 in this case) has something to do 
with the result I'm getting, but I'm not sure.

Any suggestions as to how I can get back to RText having the color of the
window,
and not the shaded gray, will be much appreciated.

Thanks.

Regards,

Jim

new topic     » topic index » view message » categorize

2. Re: [WIN] Win32lib v0.55 RText problem

Hi Jim,
the current version v0.55.1 divides controls into those having Button Face
Color and those having Window Color. This was done because some controls
looked wrong under the older scheme were all had Button face color. However,
I can see from your request that if the parent window doesn't have
ButtonFace color ('cos you ran setWindowBackColor()), then some controls are
now the "wrong" color when created. To remedy this, I propose that certain
controls take their parent's color when created. Others like EditText and
MleText will still have Window Color.

As a workaround, you could always run setWindowBackColor() on controls to
fix this scheme before rendering the controls.

  object ParentColor
  ParentColor = getControlInfo(ChildWin, {CONTROLINFO_bcolor})
  ParentColor = ParentColor[1]

  Label1  = create( RText, "Enter earliest YEAR to process",  ChildWin, 18,
30, 250, 20, 0 ),
  setWindowBackColor( Label1,  ParentColor )

------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)

----- Original Message -----
From: "Jim Duffy" <futures8 at earthlink.net>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, February 21, 2001 11:35 AM
Subject: [WIN] Win32lib v0.55 RText problem


>
> Hi all,
>
> Recently switched from using Win32lib v.50 to v.55 to be able to use
doEvent().
>
> The background color of the RText control is now a shaded gray, whereas in
v. 0.50
> it took the background color of the window in which it exists. I much
prefer the
> v .50 appearance (i.e., RText having the background color of its window).
>
> Here's the line in question:
>
> Label1  = create( RText, "Enter earliest YEAR to process",  ChildWin, 18,
30, 250, 20, 0 ),
>
> I suspect that the very last parameter (0 in this case) has something to
do
> with the result I'm getting, but I'm not sure.
>
> Any suggestions as to how I can get back to RText having the color of the
window,
> and not the shaded gray, will be much appreciated.
>
> Thanks.
>
> Regards,
>
> Jim
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: [WIN] Win32lib v0.55 RText problem

Hi Derek,

Once again, thanks for the detailed explanation of the cause of the problem, and
the iffered solution. I've been working
for the past two days trying to get the solution you propose working, but
without success. The RText lines still have
the gray background.

I've included the pertinent section of the code, (at the end of this e-mail)
hoping that you might spot the problem.

The pertient lines are flagged by  the following;      
                                           -- 02/20     <<<<<<<<<<<<<<<<    
for easier identifcation.

Thanks for the help.

Regards, Jim   

ddparnell at bigpond.com wrote:
> 
> Hi Jim,
> the current version v0.55.1 divides controls into those having Button Face
> Color and those having Window Color. This was done because some controls
> looked wrong under the older scheme were all had Button face color. However,
> I can see from your request that if the parent window doesn't have
> ButtonFace color ('cos you ran setWindowBackColor()), then some controls are
> now the "wrong" color when created. To remedy this, I propose that certain
> controls take their parent's color when created. Others like EditText and
> MleText will still have Window Color.
> 
> As a workaround, you could always run setWindowBackColor() on controls to
> fix this scheme before rendering the controls.
> 
>   object ParentColor
>   ParentColor = getControlInfo(ChildWin, {CONTROLINFO_bcolor})
>   ParentColor = ParentColor[1]
> 
>   Label1  = create( RText, "Enter earliest YEAR to process",  ChildWin, 18,
> 30, 250, 20, 0 ),
>   setWindowBackColor( Label1,  ParentColor )
> 
> ------
> Derek Parnell
> Melbourne, Australia
> (Vote [1] The Cheshire Cat for Internet Mascot)
> 
> ----- Original Message -----
> From: "Jim Duffy" <futures8 at earthlink.net>
...
> > Recently switched from using Win32lib v.50 to v.55 to be able to use
> doEvent().
> >
> > The background color of the RText control is now a shaded gray, whereas in
> v. 0.50
> > it took the background color of the window in which it exists. I much
> prefer the
> > v .50 appearance (i.e., RText having the background color of its window).
> > Here's the line in question:
> > Label1  = create( RText, "Enter earliest YEAR to process",  ChildWin, 18,
> 30, 250, 20, 0 ),

> > Jim

--  Cand0221.exw  from Candles.exw      02/12/2001               
-- 01.29 version adds crash_file() and crash_message()
--  experimental version will create window to display procesing status
-- 02-12-2001     -- version will attempt to expand tweezers for 10 days. Also,
allow approximately equal lows or highs
--                   where approximate means within (tolerance) percent of the
AvgDailyRange(10)
-- 02-13-2001     -- modify to list in patterns output the numbwer of days
between tweezer points. i.e., (4), (10),
-- 02-15-2001     -- modify input years to 4 digits.
-- 02-20-2001     -- allow escape from update and analyze via derek parnell's
solution... see \derek2.txt

include file.e
include database.e
include strtok.e
include jimlib.e        
include machine.e
include msgbox.e
include win32lib.ew

without warning
with trace             
allow_break(0)
global sequence
Year1,Month1,Year2,Month2,CutOffDate,CutOffDate2,entry1,entry2,entry3,entry4,entry5,text,
                CutMonth,CutDay,CutYear,NumDays
                   
global object   x,Dir,UserDates,fn,fn2,DateRecord,z,r,Body,AvgBody,TotBody

global integer  result,i,i2,PattRecs,OneTick,NumTables,TablesRead,gCancelled

global atom     AvgClose,Lowest,Highest,OpenX,HighX,LowX,CloseX

global constant Version = "2.41", tolerance = .10

global object   ParentColor    -- 02/22       <<<<<<<<<<<<<<<<<<

global constant Window1       = create( Window, "Candlestick Analyzer", 0, 0, 0,
500, 400, 0 )
global constant ChildWin      = create( Window,"Processing Parameters",         
 Window1, 30, 110, 450, 285, #C40000 )
-- 285 was 280
ParentColor                   = getControlInfo(ChildWin, {CONTROLINFO_bcolor})  
--  02/22    <<<<<<<<<<<
ParentColor                   = ParentColor[1]                                  
--  02/22    <<<<<<<<<<<

global constant StartYear     = create( EditText,"",        ChildWin,275,
30,34,20,0)
global constant Label1        = create( RText, "Enter earliest YEAR to process",
 ChildWin, 18,  30, 250, 20, 0 )
setWindowBackColor( Label1,  ParentColor )                     -- 02/22      
<<<<<<<<<<

global constant StartMonth    = create( EditText,"",        ChildWin,275,
60,22,20,0)

global constant Label2        = create( RText, "Enter earliest MONTH to
process", ChildWin, 18,  60, 250, 20, 0 )
setWindowBackColor( Label2,  ParentColor )                     -- 02/22     
<<<<<<<<<<<<

global constant EndYear       = create( EditText,"",        ChildWin,275,
90,34,20,0)
global constant Label3        = create( RText, "Enter latest YEAR to process",  
 ChildWin, 18,  90, 250, 20, 0 )
setWindowBackColor( Label3,  ParentColor )                     -- 02/22        
<<<<<<<<<
global constant EndMonth      = create( EditText,"",       
ChildWin,275,120,22,20,0)
global constant Label4        = create( RText, "Enter latest MONTH to process", 
 ChildWin, 18, 120, 250, 20, 0 )
setWindowBackColor( Label4,  ParentColor )                     -- 02/22         
  <<<<<<<<<
global constant CutOff        = create( EditText,"",       
ChildWin,275,150,70,20,0)
global constant Label5        = create( RText, "Enter Cutoff Date for
processing",ChildWin, 18, 150, 250, 20, 0 )
setWindowBackColor( Label5,  ParentColor )                     -- 02/22         
  <<<<<<<<<<<
global constant Label6        = create( RText, "( Ex:  06/19/2001 ) ",          
 ChildWin, 18, 175, 330, 20, 0 )
setWindowBackColor( Label6,  ParentColor )                     -- 02/22         
  <<<<<<<<<<<
      
global constant UpdateButton  = create( DefPushButton, "UPDATE",      Window1,
20,  240, 100, 25, 0 )
global constant AnalyzeButton = create( DefPushButton, "ANALYZE",     Window1,
140, 240, 100, 25, 0 )
global constant AboutButton   = create( DefPushButton, "ABOUT",       Window1,
260, 240, 100, 25, 0 )
global constant ExitButton    = create( DefPushButton, "EXIT",        Window1,
380, 240, 100, 25, 0 )
global constant AcceptButton  = create( DefPushButton, "OK",         
ChildWin,325, 200, 100, 25, 0 )
global constant ShowButton    = create( DefPushButton, "SHOW LAST",   Window1,
200, 280, 100, 25, 0 )
global constant CancelButton1 = create(PushButton, "&Cancel",         Window1, 
20, 280, 100, 25, 0 )
global constant CancelButton2 = create(PushButton, "&Cancel",        
ChildWin,325, 230, 100, 25, 0 )
global constant ProgressBar49 = create( ProgressBar, "ProgressBar49", ChildWin,
35, 226, 252, 20, 0 )
global constant ProgressBar50 = create( ProgressBar, "ProgressBar50", Window1, 
30, 215, 252, 20, 0 )

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu