Page 2 of 2

Posted: Thu Feb 14, 2008 8:45 pm
by PB
> can I see a screenshot of what you get with my original code without my last fix. ?

Here's what the original code looks like.

Left image is when first run. Green tabs look okay, without the line, but that's
only because the green box covers it. I don't want/need a colored background;
I only want to change the text color.

Right image is after I click the middle tab, and it has the line as you can see.

Image

Posted: Thu Feb 14, 2008 8:55 pm
by rsts
Will it work to your specifications if you use the panel color for the fillrect command?

cheers

Posted: Thu Feb 14, 2008 8:59 pm
by PB
@rsts: Good thinking! 8)

I just replaced greenBrush = CreateSolidBrush_(#Green) with
greenBrush = CreateSolidBrush_(GetSysColor_(#COLOR_3DFACE))
and it works perfectly now!

Thanks to Sparkie and yourself for all your help. :D

Posted: Fri Feb 15, 2008 3:17 am
by Sparkie
Sorry PB, I misunderstood which line you were referring to. :oops:

Thanks rsts for your helping hand. I've applied your fix to my original code. ;)

Posted: Fri Feb 15, 2008 1:23 pm
by PB
One last thing, Sparkie. :?

The text on the deselected tabs are not centered vertically properly; they are
too high. See the two images above, where "Panel 3" in both images is too
close to the top of the tab? Do you know how to fix that? I know it's to do
with a RECT structure but can't figure out how to set it, and perhaps drop
the #DT_VCENTER flag too?

Posted: Fri Feb 15, 2008 3:28 pm
by Sparkie
PB, try adding this just before each DrawText_()...

Code: Select all

*PGdis\rcItem\top + 3

Posted: Fri Feb 15, 2008 11:38 pm
by PB
> *PGdis\rcItem\top + 3

Thanks man! I was trying *PGdis.rcItem\top+3 which was failing. It didn't
occur to me that I could use 2 x \ in there, I thought it was a syntax error.

Now this fixes the non-selected tabs, but the selected one is too low. But,
I think I can fix this one myself. ;)

Posted: Tue Feb 19, 2008 11:13 am
by PB
> I think I can fix this one myself

Worked it out! :) It's done like this:

Code: Select all

If *PGdis\itemID<>GetGadgetState(PGNumber)
  *PGdis\rcItem\top+3
EndIf