Sign in to follow this  
Followers 0
Digetal

Newb -Removeing white border on buttons?

12 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



maybe add the image

Share this post


Link to post
Share on other sites

maybe add the image

<{POST_SNAPBACK}>

??? What you mean by add the image. The example I gave shows that the image is set to the button right?

PS

Thank you for the reply. It's not a huge prob. But, It just drives me nuts

Share this post


Link to post
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")

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
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

Share this post


Link to post
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...


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$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

Share this post


Link to post
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)

Share this post


Link to post
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")

Share this post


Link to post
Share on other sites

Just to clear things up, my suggestion was to replace the button altogether with the Pic control.

They are clickable.

$mintotray = GUICtrlCreatePic("t3.bmp", 296,2,15,13)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0