Alaska Software Inc. - Re: Buggy XbpStatic:SetCaption()
Username: Password:
AuthorTopic: Re: Buggy XbpStatic:SetCaption()
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: Buggy XbpStatic:SetCaption()
on Sun, 15 Feb 2015 04:31:04 -0500
Itai,

>only the child is set with a caption, but the re-painting is badly done and 
>the child must be reconfigured in order to change a caption.

In your example code snippet, you used a Static with the caption of 
"Second round caption" as the parent for a second Static with the caption 
of "First round description". In addition, your parent is 100 pixels long 
and 24 pixels high, while our child is positioned 2 pixels to the right 
and 10 pixels up on the parent, and is 80 pixels long/wide and only 16 
pixels high. That means that to the left, 2 pixels and on the bottom 10 
pixels of the original "Second round caption" text will always be visible.
You then change the caption of the child (also) to "Second round caption", 
which makes it look like there is a shadow. Additionally, the Statics are 
both too short to hold the entire caption text, so they show an ellipsis 
(...) at the end.

You have the text "ʽSecond round captionʼ" actually in invalid single quote 
characters, that would cause a runtime error in Xbase++, if actually used. 

>Try it and see what happens when the caption is changed (the first time 
>caption is OK, but changing the caption is ill-performed).

I can change the caption as often as I want, and it always looks exactly as 
I expect it. To make this look good, you can chose any of the four options 
that I mentioned in my previous post.

>It is a bug that did not exist in 1.9.

I can't see any difference between 1.9.355 and 2.0.570 behavior for this.

Please post a small, compilable, demo program, as well as screen shots of 
what you get when you run that program compiled with 1.9 and 2.0, and maybe 
even some info about your environment (Windows version, etc.)

Without this, there is no way that anyone can really help you. And when you 
create this test program, you might even find what the actual problem is -- 
and that it isn't an Xbase++ bug.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net