Trollol96 Posted September 23, 2011 Share Posted September 23, 2011 Hi, how i do a vertical button? Or rotate a button? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2011 Moderators Share Posted September 23, 2011 Trollo196, Welcome to the AutoIt forum. Like this perhaps? #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("B" & @CRLF & "u" & @CRLF & "t" & @CRLF & "t" & @CRLF & "o" & @CRLF & "n", 10, 10, 30, 80, $BS_MULTILINE) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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...
Trollol96 Posted September 23, 2011 Author Share Posted September 23, 2011 Thank you Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 23, 2011 Moderators Share Posted September 23, 2011 Trollol96, Glad it was that easy! 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...
funkey Posted September 23, 2011 Share Posted September 23, 2011 Other method is a bit tricky: expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #Region _GuiCtrlSetFont.au3 ;Copyrights to funkey !! #include <WinAPI.au3> OnAutoItExitRegister("_FontCleanUp") Global $ahFontEx[1] = [0] Func _GuiCtrlSetFont($controlID, $size, $weight = 400, $attribute = 0, $rotation = 0, $fontname= "", $quality = 2) Local $fdwItalic = BitAND($attribute, 1) Local $fdwUnderline = BitAND($attribute, 2) Local $fdwStrikeOut = BitAND($attribute, 4) ReDim $ahFontEx[UBound($ahFontEx) + 1] $ahFontEx[0] += 1 $ahFontEx[$ahFontEx[0]] = _WinAPI_CreateFont($size, 0, $rotation * 10, 0, $weight, _ $fdwItalic, $fdwUnderline, $fdwStrikeOut, -1, 0, 0, $quality, 0, $fontname) GUICtrlSendMsg($controlID, 48, $ahFontEx[$ahFontEx[0]], 1) EndFunc Func _FontCleanUp() For $i = 1 To $ahFontEx[0] _WinAPI_DeleteObject($ahFontEx[$i]) Next EndFunc #EndRegion $hGUI = GUICreate("Test", 200, 120) $hButton1 = GUICtrlCreateButton("B" & @CRLF & "u" & @CRLF & "t" & @CRLF & "t" & @CRLF & "o" & @CRLF & "n", 10, 10, 30, 100, $BS_MULTILINE) $hButton2 = GUICtrlCreateButton("Button", 160, 10, 30, 100, BitOR($BS_LEFT, $BS_BOTTOM)) _GuiCtrlSetFont(-1, 18, 400, 0, 90) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
monoscout999 Posted September 24, 2011 Share Posted September 24, 2011 @funkey nice example! 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