Jump to content

Newb -Removeing white border on buttons?


Digetal
 Share

Recommended Posts

Thank you for the replies.

I think I have to rephrase.When creating a button in a gui you can set an image to it by simply using GUICtrlSetImage (-1,image name here). When you do this the image is placed on the button and the button has a white border or frame. Im using a black background with dark images that are set to buttons. My problem is that placing a black button with a white frame onto a dark background looks odd. I just need to find a way to make a button and place a graphic on top of it that will stay there even when clicked, without a white border e my problem. When creatting a button in a gui

Example of the script making each one:

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,0x8000 + 0x0080); 3rd button at top right

GUICtrlSetImage (-1, "t3.bmp")

I have also tried GUICtrlCreatePic

I'm trying this: it creates an invisable button and places an icon on top, but as soon as you put your mouse over the button the icon dissapears. This I a bad substitute.

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,0x0E); 3rd button at top right

GUICtrlCreatePic("t3.bmp",296,2,15,13,0x04,0x00000008)

Please Help!

Edited by Digetal
Link to comment
Share on other sites

see if this works....

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,Bitor(0x8000,0x0080,BitNot($WS_BORDER))); 3rd button at top right
GUICtrlSetImage (-1, "t3.bmp")

<{POST_SNAPBACK}>

OK, looks like it removes the icon completely. I only get to see it for a second because for some reason it minimizes the gui to the tray. I then click on the tray icon to make the menu appear and it just minimizes again. It could somehow affect my minimize to tray function.

I think you've got something there I'll try some different variations.. Thanks

Link to comment
Share on other sites

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,BitAnd(0x8000,0x0080,BitNot($WS_BORDER))); 3rd button at top right
GUICtrlSetImage (-1, "t3.bmp")

try this...

<{POST_SNAPBACK}>

I did try it.. The post before discusses the error I came across. It just kept minimizing to tay. I can post the entire code? It's long.

I'm trying this: it creates an invisable button and places an icon on top, but as soon as you put your mouse over the button the icon dissapears. This I a bad substitute.

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,0x0E); 3rd button at top right

GUICtrlCreatePic("t3.bmp",296,2,15,13,0x04,0x00000008)

Edited by Digetal
Link to comment
Share on other sites

Have you tried using GuiCtrlCreatePic?

<{POST_SNAPBACK}>

Thank you for the reply.

I think I have to rephrase.When creating a button in a gui you can set an image to it by simply using GUICtrlSetImage (-1,image name here). When you do this the image is placed on the button and the button has a white border or frame. Im using a black background with dark images that are set to buttons. My problem is that placing a black button with a white frame onto a dark background looks odd. I just need to find a way to make a button and place a graphic on top of it that will stay there even when clicked, without a white border e my problem. When creatting a button in a gui

I have tried GUICtrlCreatePic

I'm trying this: it creates an invisable button and places an icon on top, but as soon as you put your mouse over the button the icon dissapears. This I a bad substitute.

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,0x0E); 3rd button at top right

GUICtrlCreatePic("t3.bmp",296,2,15,13,0x04,0x00000008)

Link to comment
Share on other sites

I finally figured it out "0x0E00A"

came up with this trying every possible combo:it makes a borderless button, and with another line keeps it that way!!!!

NO MORE FRAMES AROUND YOUR BUTTONS!

Example:

$mintotray = GUICtrlCreateButton( "", 296,2,15,13,0x0080 + 0x0E00A); 3rd button at top right

GUICtrlSetImage(-1, "t3.bmp")

Link to comment
Share on other sites

Thanks Saunders!

Please, excuse me for not understanding what you meant. I had no idea they where clickable. This would be a great idea because it would replace three lines of code for one in each variable I have this problem with. I'm testing it out to try and get 100% functionality out of guictrlcreatpic(). Again thanks for the reply and correcting me.

Edited by Digetal
Link to comment
Share on other sites

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...