Datus Posted May 21, 2009 Share Posted May 21, 2009 Cant see whats wrong here but as soon as you set the color of the button the styles are ignored and text is placed at the top of the button. Im probably using the wrong command to change color but tried it with built in code designer to make sure. Any ideas? #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> GUICreate("My GUI Button") $Button_1 = GUICtrlCreateButton("Run Notepad", 10, 30, 100,100,$BS_BOTTOM) $Button_2 = GUICtrlCreateButton("Button Test", 10, 140, 100,100,$BS_BOTTOM) GUICtrlSetBkColor(-1, 0x00ff00) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd not found anything on search. We live as we dream alone! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 21, 2009 Moderators Share Posted May 21, 2009 Datus, There are several bugs affecting coloured buttons - for example, there has been an open Trac ticket on them trapping Enter for about a year. Best to avoid them if you can. :-) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Datus Posted May 21, 2009 Author Share Posted May 21, 2009 ive used a label instead. still doesnt give exaclty the control i wanted but better than the button in present form. wish they would spend some more time sorting out gui controls and settings rather than adding even more complicated functions. spend more time trying work arrounds than coding these days. But still i love Autoit and wouldnt be without it. We live as we dream alone! Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 22, 2009 Share Posted May 22, 2009 i never use buttons anymore... labels are so much more customizable... i even use labels for my exit buttons and minimize buttons.. labels can be used for everything (that i know of) that a button can be used for [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Yashied Posted May 22, 2009 Share Posted May 22, 2009 Datus,There are several bugs affecting coloured buttons - for example, there has been an open Trac ticket on them trapping Enter for about a year.Best to avoid them if you can. :-)M23Perhaps this is really not a bug, but feature elements in Windows, because the button is created on the basis of a certain style (picture). My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Datus Posted May 23, 2009 Author Share Posted May 23, 2009 one thing i want to do is put text from bottom up. you cant do that with a label. or can you? We live as we dream alone! Link to comment Share on other sites More sharing options...
martin Posted May 23, 2009 Share Posted May 23, 2009 one thing i want to do is put text from bottom up. you cant do that with a label. or can you? I don't think you can with a style, but you could arrange it by adding empty lines. GUICreate("label text") GUICtrlCreateLabel(@CRLF & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF & " bottom",20,20,100,100) GUICtrlSetBkColor(-1,0x006666) GUICtrlSetColor(-1,0xFFFFFF) GUISetState() while GUIGetMsg() <> -3 WEnd It depends on why you want it and what you want to do with the label though. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Datus Posted May 23, 2009 Author Share Posted May 23, 2009 that fine if you know what your going to put in the label. however i read a file with film names in which can be multiple words etc. just as my example code shows at the start. was just responding to comments made by codybarret We live as we dream alone! Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 25, 2009 Share Posted May 25, 2009 there was a style that one of the MPV's mentioned a while back... i can't remember it off hand.. but ill look, maybe im remembering falsly.. in that case martin would be right.. GAHH its on the tip of my tounge [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
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