1. Jim Means
  2. PowerBuilder
  3. Tuesday, 2 April 2019 00:08 AM UTC

I just received a new Win 10 machine (yuck) for work.  Got PB 2017 R2 Build 1769 installed no problem.  I'll worry about moving to new versions when I have time.  Right now, I have some stuff to do that can't wait, but first, a goofy problem.

On every datawindow where I have tab pages the tabs have changed color.  They used to be white text on a navy blue background.  Now all of a sudden, the selected tab is white text on a white background. Unselected tabs are white text on a light gray (buttonface background).

I assume some of this nonsense has been inherited from Win 10, but there must be a way to modify the look from within PB.  I've read the manuals, the help, and even tweaked u_tabpg and everything I can find that's inherited from it.  Anyone know how to take care of this?

Please take it easy on the replies.  I'm no expert.  I inherited this thing a while back.  I still have a question open regarding moving to the new PFCs.  That one is still out.  I was spending way too much time trying to figure that out.

I can provide a couple pics if needed.

Thanks loads,
Jim

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 19:13 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Jim;

   Yes, this due to the fact that newer PB's like 12.6 and 2017Rx have been tuned to the W10 look & feel. You can still see the old behaviour in your App EXE's by checking the "Windows Classic Style" in your PB "Project" painter when you build your EXE's.

   The other new way to give the tab controls a completely new look & feel - and even develop your own custom look as well - is to use the new PB2019 "THEME" feature coming in May of this year.

FYI:  https://www.appeon.com/developers/roadmap/modernize-existing-controls.html

Regards ... Chris

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 03:34 AM UTC
  2. PowerBuilder
  3. # 1

Here you go:



// ===============
// More reference data
// ===============

Get the numeric value for a color - Real's PowerBuilder How-to Get the numeric
value for a color
(from the pfc_n_cst_color class)

BUTTONFACE =  78682240
WINDOW_BACKGROUND = 1087434968
WINDOW_TEXT = 33554592
APPLICATION_WORKSPACE = 268435456
TRANSPARENT = 553648127

BLACK = RGB(0, 0, 0)
WHITE = RGB(255, 255, 255)
LIGHT_GRAY = RGB(192, 192, 192)
DARK_GRAY = RGB(128, 128, 128)
RED = RGB(255, 0, 0)
DARK_RED = RGB(128, 0, 0)
GREEN = RGB(0, 255, 0)
DARK_GREEN = RGB(0, 128, 0)
BLUE = RGB(0, 0, 255)
DARK_BLUE = RGB(0, 0, 128)
MAGENTA = RGB(255, 0, 255)
DARK_MAGENTA = RGB(128, 0, 128)
CYAN = RGB(0, 255, 255)
DARK_CYAN = RGB(0, 128, 128)
YELLOW = RGB(255, 255, 0)
BROWN = RGB(128, 128, 0)


These values are hard-coded, if you need more flexibilty, you can query Windows
to dynamically get the current color setting. [External function declaration]
FUNCTION unsignedlong GetSysColor(int nIndex) LIBRARY "user32.dll"


using the following parameters : COLOR_SCROLLBAR           0
COLOR_BACKGROUND          1
COLOR_ACTIVECAPTION       2
COLOR_INACTIVECAPTION     3
COLOR_MENU                4
COLOR_WINDOW              5
COLOR_WINDOWFRAME         6
COLOR_MENUTEXT            7
COLOR_WINDOWTEXT          8
COLOR_CAPTIONTEXT         9
COLOR_ACTIVEBORDER        10
COLOR_INACTIVEBORDER      11
COLOR_APPWORKSPACE        12
COLOR_HIGHLIGHT           13
CLOR_HIGHLIGHTTEXT        14
COLOR_BTNFACE             15
COLOR_BTNSHADOW           16
COLOR_GRAYTEXT            17
COLOR_BTNTEXT             18
COLOR_INACTIVECAPTIONTEXT 19
COLOR_BTNHIGHLIGHT        20

// (WINVER >= 0x0400)
COLOR_3DDKSHADOW          21
COLOR_3DLIGHT             22
COLOR_INFOTEXT            23
COLOR_INFOBK              24
COLOR_DESKTOP             COLOR_BACKGROUND
COLOR_3DFACE              COLOR_BTNFACE
COLOR_3DSHADOW            COLOR_BTNSHADOW
CLOR_3DHIGHLIGHT          COLOR_BTNHIGHLIGHT
COLOR_3DHILIGHT           COLOR_BTNHIGHLIGHT
COLOR_BTNHILIGHT          COLOR_BTNHIGHLIGHT

Later -

Olan

Comment
  1. Roland Smith
  2. Tuesday, 2 April 2019 20:45 PM UTC
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.