Author | Topic: SLE with rounded edges | |
---|---|---|
Salvatore Megna | SLE with rounded edges on Wed, 19 Jun 2019 10:18:48 +0200 Hi, Is it possible to create SLE with rounded edges? Thanks | |
Jim Lee | Re: SLE with rounded edges on Thu, 20 Jun 2019 05:53:56 +0200 Hi, > Is it possible to create SLE with rounded edges? i have never try to make round SLE ... you can use API Function CreateRoundRectRgn() and SetWindowRgn() to "mask Edge" e.g. to make round Buttons. Round or oval XbpPushButton public.xbase++.gui 29. September 2018 SetWindowRgn() public.xbase++.gui 3. Oktober 2018 --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Carlos A Beling | Re: SLE with rounded edges on Thu, 20 Jun 2019 12:03:38 -0300 Good day. May be the example attached to be useful. If you improve it, please post the example here. Fraternally Beling Em 20/06/2019 00:53, Jim Lee escreveu: > Hi, > >> Is it possible to create SLE with rounded edges? > > i have never try to make round SLE ... > > you can use API Function CreateRoundRectRgn() and SetWindowRgn() to "mask > Edge" e.g. to make round Buttons. > > Round or oval XbpPushButton > public.xbase++.gui > 29. September 2018 > > SetWindowRgn() > public.xbase++.gui > 3. Oktober 2018 > > > > --- > Diese E-Mail wurde von AVG auf Viren geprüft. > http://www.avg.com > Rounded.prg | |
Jose Antonio Diego Kereje | Re: SLE with rounded edges on Thu, 20 Jun 2019 21:57:08 +0200 Here is an sample. I have replicated the look and functionality of W10&v1903, so I do not know how it will behave in previous versions. Perhaps it would have been better to develop a custom look, which would be the same in any version of Windows, just like I did in RoundPB class. It happens to me as with the rounded buttons, I just did not like it. I have used the RoundPB class, but with rectangular buttons, to get that look "rich and consistent" in all systems. The code is incomplete and you must develop it to adapt it to your needs. Regards. Diego RoundSle.zip | |
Jose Antonio Diego Kereje | Re: SLE with rounded edges on Thu, 20 Jun 2019 22:42:30 +0200 | |
Anand Gupta | Re: SLE with rounded edges on Sat, 22 Jun 2019 13:24:56 +0200 Jose Antonio Diego Kereje wrote in message news:3338a6fa$1943dae5$89bde@news.alaska-software.com... >A last minute change has resulted in the cueBanner not showing > >Regards. Diego Thanks Diego, Very good working example of rounded sle. Regards, Anand | |
Jose Antonio Diego Kereje | Re: SLE with rounded edges on Sun, 23 Jun 2019 21:36:15 +0200 Hi, I am finishing the first operational version of the RoundSle class. I have fixed several mismatches of the previous code, I have added color and normal/hover/hot state support(frame&area), and now, the text can appear vertically centered in the frame. And although I have also replicated the standard look of the XbpSle in W10-1903, it is not consistent in others OS. Does anyone know the defines that set the default appearance of the following elements:? Frame (normal state): Frame (hover): Frame (Hot-focus): XBPSYSCLR_HILITEBACKGROUND Text: XBPSYSCLR_OUTPUTTEXT Disabled text: Background: XBPSYSCLR_ENTRYFIELD Disabled background: XBPSYSCLR_3DFACE Regards. Diego ScreenShotColor.png ScreenShotDefault.png | |
Jim Lee | Re: SLE with rounded edges on Sun, 23 Jun 2019 23:54:16 +0200 > Frame (normal state): > Frame (hover): > Frame (Hot-focus): XBPSYSCLR_HILITEBACKGROUND > Text: XBPSYSCLR_OUTPUTTEXT > Disabled text: > Background: XBPSYSCLR_ENTRYFIELD > Disabled background: XBPSYSCLR_3DFACE Windows active Theme Color are under "HKEY_CURRENT_USER\Control Panel\Colors" --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Jim Lee | Re: SLE with rounded edges on Mon, 24 Jun 2019 01:40:16 +0200 more about Windows Theme Color there are 30 COLOR_* Constante in WinUser.H but 51 XBPSYSCLR_* Constante #define COLOR_SCROLLBAR 0 XBPSYSCLR_SCROLLBAR #define COLOR_BACKGROUND 1 XBPSYSCLR_BACKGROUND #define COLOR_ACTIVECAPTION 2 XBPSYSCLR_ACTIVETITLE #define COLOR_INACTIVECAPTION 3 XBPSYSCLR_INACTIVETITLE #define COLOR_MENU 4 XBPSYSCLR_MENU #define COLOR_WINDOW 5 XBPSYSCLR_WINDOW #define COLOR_WINDOWFRAME 6 XBPSYSCLR_WINDOWFRAME #define COLOR_MENUTEXT 7 XBPSYSCLR_MENUTEXT #define COLOR_WINDOWTEXT 8 XBPSYSCLR_WINDOWTEXT #define COLOR_CAPTIONTEXT 9 XBPSYSCLR_ACTIVETITLETEXT #define COLOR_ACTIVEBORDER 10 XBPSYSCLR_ACTIVEBORDER #define COLOR_INACTIVEBORDER 11 XBPSYSCLR_INACTIVEBORDER #define COLOR_APPWORKSPACE 12 XBPSYSCLR_APPWORKSPACE #define COLOR_HIGHLIGHT 13 XBPSYSCLR_HILITEBACKGROUND #define COLOR_HIGHLIGHTTEXT 14 XBPSYSCLR_HILITEFOREGROUND #define COLOR_BTNFACE 15 XBPSYSCLR_3DFACE #define COLOR_BTNSHADOW 16 XBPSYSCLR_3DSHADOW #define COLOR_GRAYTEXT 17 XBPSYSCLR_MENUDISABLEDTEXT #define COLOR_BTNTEXT 18 XBPSYSCLR_BUTTONTEXT #define COLOR_INACTIVECAPTIONTEXT 19 XBPSYSCLR_INACTIVETITLETEXT #define COLOR_BTNHIGHLIGHT 20 XBPSYSCLR_3DHIGHLIGHT #define COLOR_3DDKSHADOW 21 XBPSYSCLR_3DDARKSHADOW #define COLOR_3DLIGHT 22 XBPSYSCLR_3DLIGHT #define COLOR_INFOTEXT 23 XBPSYSCLR_INFOTEXT #define COLOR_INFOBK 24 XBPSYSCLR_INFOBACKGROUND #define COLOR_HOTLIGHT 26 XBPSYSCLR_HOTLIGHTBGND #define COLOR_GRADIENTACTIVECAPTION 27 XBPSYSCLR_GRADIENTACTIVETITLE #define COLOR_GRADIENTINACTIVECAPTION 28 XBPSYSCLR_GRADIENTINACTIVETITLE #define COLOR_MENUHILIGHT 29 XBPSYSCLR_MENUHILITE #define COLOR_MENUBAR 30 XBPSYSCLR_MENUBAR #define COLOR_DESKTOP COLOR_BACKGROUND #define COLOR_3DFACE COLOR_BTNFACE #define COLOR_3DSHADOW COLOR_BTNSHADOW #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT you can get Color with API Function GetSysColor() [url]https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getsyscolor[/url] [quote]The function returns the red, green, blue (RGB) color value of the given element.[/quote] DLLFUNCTION GetSysColor(n) USING STDCALL FROM USER32.DLL nColor := COLOR_SCROLLBAR nRet := AutomationTranslateColor( GetSysColor(nColor) , .T. ) --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Jose Antonio Diego Kereje | Re: SLE with rounded edges on Mon, 24 Jun 2019 22:33:16 +0200 Hi Jim, Thank you very much for the information. Unfortunately none of the XBPSYSCLR_ nor the COLOR_ matches the frame of the XbpSle object. It's not a big problem, but ... Here is the final version of the RoundSle class. Regards. Diego RoundSle.zip | |
Carlos A Beling | Re: SLE with rounded edges. Example on Fri, 21 Jun 2019 10:28:34 -0300 Hi. Here is the example that I posted before including a function that was ommited. Fraternally Beling Em 19/06/2019 05:18, Salvatore Megna escreveu: > Hi, > Is it possible to create SLE with rounded edges? > > Thanks Rounded.prg |