skippynz Posted March 3, 2008 Posted March 3, 2008 when i try to use text with an ampersand in it a message box will display the text correctly however a guictrlcreatelabel does not. does anyone have an idea how i can get this to display correctly all the time in guictrlcreatelabel ? the text in $test is pulled from an sql server but below i have just displayed the issue. thanks Craig CODE#include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetHelp("notepad") ; will run notepad if F1 is typed Opt("GUICoordMode",2) $test = "test 1 & 2 & 3" GUICtrlCreateLabel ($test,10,10,100) ; first cell 70 width GUISetState () ; will display an empty dialog box msgbox(0,'test',$test) ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE
Moderators SmOke_N Posted March 3, 2008 Moderators Posted March 3, 2008 #include <GUIConstantsEx.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetHelp("notepad") ; will run notepad if F1 is typed Opt("GUICoordMode",2) $test = "test 1 && 2 && 3" GUICtrlCreateLabel ($test,10,10,100) ; first cell 70 width GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
skippynz Posted March 3, 2008 Author Posted March 3, 2008 LEGEND - thanks for the quick reply SmokeN - that did the trick #include <GUIConstantsEx.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetHelp("notepad") ; will run notepad if F1 is typed Opt("GUICoordMode",2) $test = "test 1 && 2 && 3" GUICtrlCreateLabel ($test,10,10,100) ; first cell 70 width GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE
covaks Posted March 3, 2008 Posted March 3, 2008 Add style $SS_NOPREFIX to the label. GUICtrlCreateLabel ($test,10,10,100,-1,$SS_NOPREFIX)
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