Digetal Posted September 13, 2005 Posted September 13, 2005 (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 September 14, 2005 by Digetal
Digetal Posted September 13, 2005 Author Posted September 13, 2005 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?PSThank you for the reply. It's not a huge prob. But, It just drives me nuts
quaizywabbit Posted September 13, 2005 Posted September 13, 2005 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
Digetal Posted September 14, 2005 Author Posted September 14, 2005 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
quaizywabbit Posted September 14, 2005 Posted September 14, 2005 $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
Digetal Posted September 14, 2005 Author Posted September 14, 2005 (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 rightGUICtrlCreatePic("t3.bmp",296,2,15,13,0x04,0x00000008) Edited September 14, 2005 by Digetal
therks Posted September 14, 2005 Posted September 14, 2005 Have you tried using GuiCtrlCreatePic? My AutoIt Stuff | My Github
Digetal Posted September 14, 2005 Author Posted September 14, 2005 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 GUICtrlCreatePicI'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 rightGUICtrlCreatePic("t3.bmp",296,2,15,13,0x04,0x00000008)
Digetal Posted September 14, 2005 Author Posted September 14, 2005 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")
therks Posted September 18, 2005 Posted September 18, 2005 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) My AutoIt Stuff | My Github
Digetal Posted September 19, 2005 Author Posted September 19, 2005 (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 September 19, 2005 by Digetal
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now