Jump to content

GUI Changes Needed


Jon
 Share

Recommended Posts

This is my theme support so far. Classic and M$ XP themes only

$colorname = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager', 'ColorName')
$theme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager', 'ThemeActive')

Select; Theme Support
   Case $theme = '1'
   If $colorname = 'Metallic' Then  ;Metalic
      $color = 0xFCFCFE
   ElseIf $colorname = 'HomeStead' Then  ;Olive
      $color = 0xF7F6F3
   Else
      $color = 0xF7F6F3  ; Blue
   EndIf
   
   Case $theme = '0'  ; Classic
      $color = 0xD4D0C8
EndSelect

; Label Here
GUICtrlSetBkColor(-1, $color)

But trying to mimic XP themes is bearable doing this. But the tab is lighter in color at the top and darker below.

True transparency with label etc backgrounds would be the fix?

Link to comment
Share on other sites

  • Replies 133
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This is my theme support so far. Classic and M$ XP themes only

$colorname = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager', 'ColorName')
$theme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager', 'ThemeActive')

Select; Theme Support
   Case $theme = '1'
   If $colorname = 'Metallic' Then  ;Metalic
      $color = 0xFCFCFE
   ElseIf $colorname = 'HomeStead' Then  ;Olive
      $color = 0xF7F6F3
   Else
      $color = 0xF7F6F3  ; Blue
   EndIf
   
   Case $theme = '0'  ; Classic
      $color = 0xD4D0C8
EndSelect

; Label Here
GUICtrlSetBkColor(-1, $color)

But trying to mimic XP themes is bearable doing this. But the tab is lighter in color at the top and darker below.

True transparency with label etc backgrounds would be the fix?

<{POST_SNAPBACK}>

your problem is not coming from the style but from the size of the tab.

try the following code which is correct and change size to 140 you will get the bad color

#include <Constants.au3>
#include <GuiConstants.au3>
$size=160
GuiCreate("label on tab",$size,100)
GuiCtrlCreateTab(10,10,140,80)
GuiCtrlCreateTabItem("tab1")
GuiCtrlCreateLabel("text label", 60,60)
GuiCtrlCreateTabItem("tab2")
GuiCtrlCreateTabItem("tab3")
GuiSetState()

Do
$msg=GuiGetMsg()
until $msg=$GUI_EVENT_CLOSE
Link to comment
Share on other sites

I just downloaded the latest build of autoit and copied your build over the originals. But the controls background color is the same against the tabs. I want background color for controls transparent, if possible?  :)

<{POST_SNAPBACK}>

can you email me your script so I can have a look? I don't understand your problem , I was almost sure to have solve this background issue. :)
Link to comment
Share on other sites

Bad new that's the limit on what I can do to simultate the label transparency.

The problem come from the XP style theme(Luna) which is doing a color which vary from the top to the bottom of the windows. So no color can be choosen to set the label background color. :)

I hope one day somebody can explain how to have transparent control. Perhaps Valik or Jon ...

Link to comment
Share on other sites

@jpm: did you studied a sample from here:

http://www.codeproject.com/staticctrl/transparentstatic.asp

Did you read my topic here for a possible solution?:

http://www.autoitscript.com/forum/index.php?showtopic=5485

I did some things weeks ago with it and it works so far...

Regards :)

Holger

P.S:forgot: the tip with the site on Codeproject came from "this-is-me" :-)

Edited by Holger
Link to comment
Share on other sites

@jpm: did you studied a sample from here:

http://www.codeproject.com/staticctrl/transparentstatic.asp

Did you read my topic here for a possible solution?:

http://www.autoitscript.com/forum/index.php?showtopic=5485

I did some things weeks ago with it and it works so far...

Regards :)

Holger

P.S:forgot: the tip with the site on Codeproject came from "this-is-me" :-)

<{POST_SNAPBACK}>

I didn't . It looks great.

Why are you saying a possible solution?

What are the problem which can be encountered with this code? :)

Link to comment
Share on other sites

Hey, I was just thinking... If the background of a static control can be removed, then the same thing could be done for a button, right? If so, someone could put a colored lable with no text behind a transparent button thereby making a fake colored button.

Who else would I be?
Link to comment
Share on other sites

Hey, I was just thinking... If the background of a static control can be removed, then the same thing could be done for a button, right? If so, someone could put a colored lable with no text behind a transparent button thereby making a fake colored button.

<{POST_SNAPBACK}>

The same could be said for text edits and inputs and stuff as well. Unfortunately I guess you still couldn't change the text color of them. I wish you could. I wish the GUI stuff was as flexible as HTML + CSS can be.
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...