Alaska Software Inc. - Alaska 2.0 transparency
Username: Password:
AuthorTopic: Alaska 2.0 transparency
Zoltan NagyAlaska 2.0 transparency
on Fri, 16 Oct 2015 17:51:36 +0200
Hello guys.
Please Help me.

I attached 2 picturers and a test.prg.
My problem is: Same code it works differently with xBase++ version 1.9 than 
with version 2.0

The Static with setColorBG( XBPSYSCLR_TRANSPARENT)  displayed Transparent 
with version 1.9, but with 2.0 not.

What's the solution?

Regards: Peter


test.zip
With version 1.9.PNG
With version 2.0.PNG
Andreas Gehrs-Pahl
Re: Alaska 2.0 transparency
on Sun, 18 Oct 2015 20:59:57 -0400
Peter,

>My problem is: Same code it works differently with xBase++ version 1.9 than 
>with version 2.0

To be precise, this behavior was actually changed between builds 1.90.346 
and 1.90.347, during the SL1 beta (in October 2008). All versions after 
build 346, including 1.90.355 (SL1), show the same (new) behavior.

>The Static with setColorBG( XBPSYSCLR_TRANSPARENT)  displayed Transparent 
>with version 1.9, but with 2.0 not.

The problem occurs in :InvalidateRect() of the XbStatic text, which is a 
child of the Bitmap XbStatic. The simplest solution to the issue is to use 
Owner-Draw Mode. Add the following lines of code before "oStat:Create()":

   oStat:DrawMode := XBP_DRAW_OWNER
   oStat:Draw     := {|oPS, aInfo, oSelf| Draw_Static(oPS, aInfo, oSelf)}

And then add the following function somewhere to your code:

Function Draw_Static(oPS, aInfo, oStatic)
   GraStringAt(oPS, {0, 0}, oStatic:Caption)
return (.f.)

Alternatively, you could put the entire owner draw function code directly 
into the code block, as long as you return FALSE at the end:

oStat:Draw := {|oPS, aI, oSelf| GraStringAt(oPS, {0,0}, oSelf:Caption), .f.}

A function is more flexible, though, and you could change some of the Gra* 
attributes if you like, such as selecting a different font, alignment, etc. 
for the GraStringAt() function, before drawing it.

The above code will work in all version, from 1.90.339 up to 2.00.644!

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net
Werner MartlRe: Alaska 2.0 transparency
on Mon, 26 Oct 2015 23:53:48 +0100
Andreas Gehrs-Pahl
Re: Alaska 2.0 transparency
on Tue, 27 Oct 2015 03:34:07 -0400
Werner,

>644? We are on 623!?

As I'm helping with updating the Xbase++ documentation, I have access to 
some additional, intermediate and internal releases. I believe version 
Xbase++ 2.00.644 (released on 10/12/2015) is the previously mentioned 
conference-build, which should be available for general use, shortly.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net
Otto TrappRe: Alaska 2.0 transparency
on Tue, 01 Dec 2015 10:48:33 +0100
Andreas,

Would you tell us which chapters are you working on? What I really miss 
and look forward to is a more complete documentation to 2.0.

Thanks,
Otto
Andreas Gehrs-Pahl
Re: Alaska 2.0 transparency
on Mon, 11 Jan 2016 14:19:11 -0500
Otto,

>Would you tell us which chapters are you working on? What I really miss 
>and look forward to is a more complete documentation to 2.0.

So far, I have only worked on some minor updates to the existing 2.0 
documentation, like the chapter on PBuild and the WAA / IIS installation 
and setup guide.

I hope to work on additional material, soon.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net
Otto TrappRe: Alaska 2.0 transparency
on Tue, 12 Jan 2016 10:22:51 +0100
Andreas,

> So far, I have only worked on some minor updates to the existing 2.0
> documentation, like the chapter on PBuild and the WAA / IIS installation
> and setup guide.
>
> I hope to work on additional material, soon.

I hope so too. Thanks for your answer.

Otto
Zoltan NagyRe: Alaska 2.0 transparency
on Mon, 16 Nov 2015 16:31:54 +0100
Hello.

It's a perfect solution!
Working very well.

Many thanks, for fast reply.

Regards:Peter


"Andreas Gehrs-Pahl" a következoket írta üzenetében 
news:zpkh96vynpd1.8shtivgjza3m.dlg@40tude.net...
> Peter,
>
>>My problem is: Same code it works differently with xBase++ version 1.9 
>>than
>>with version 2.0
>
> To be precise, this behavior was actually changed between builds 1.90.346
> and 1.90.347, during the SL1 beta (in October 2008). All versions after
> build 346, including 1.90.355 (SL1), show the same (new) behavior.
>
>>The Static with setColorBG( XBPSYSCLR_TRANSPARENT)  displayed Transparent
>>with version 1.9, but with 2.0 not.
>
> The problem occurs in :InvalidateRect() of the XbStatic text, which is a
> child of the Bitmap XbStatic. The simplest solution to the issue is to use
> Owner-Draw Mode. Add the following lines of code before "oStat:Create()":
>
>   oStat:DrawMode := XBP_DRAW_OWNER
>   oStat:Draw     := {|oPS, aInfo, oSelf| Draw_Static(oPS, aInfo, oSelf)}
>
> And then add the following function somewhere to your code:
>
> Function Draw_Static(oPS, aInfo, oStatic)
>   GraStringAt(oPS, {0, 0}, oStatic:Caption)
> return (.f.)
>
> Alternatively, you could put the entire owner draw function code directly
> into the code block, as long as you return FALSE at the end:
>
> oStat:Draw := {|oPS, aI, oSelf| GraStringAt(oPS, {0,0}, oSelf:Caption), 
> .f.}
>
> A function is more flexible, though, and you could change some of the Gra*
> attributes if you like, such as selecting a different font, alignment, 
> etc.
> for the GraStringAt() function, before drawing it.
>
> The above code will work in all version, from 1.90.339 up to 2.00.644!
>
> Hope that helps,
>
> Andreas
> -- 
> Andreas Gehrs-Pahl
> Absolute Software, LLC
>
> phone: (989) 723-9927
> email: Andreas.GP@Charter.net
> web:   http://www.Aerospace-History.net