JRowe Posted April 30, 2008 Share Posted April 30, 2008 I want to resize a label while the script is running. In fact, I want to have multiple resizeable labels on a form. Does anyone know if theres a simple property for this? [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
smashly Posted April 30, 2008 Share Posted April 30, 2008 Hi, you can use GUICtrlSetPos ( controlID, left, top [, width [, height]] ) Cheers Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2008 Author Share Posted April 30, 2008 (edited) Is there any way to use the WS_Sizebox property, or do I have to code it myself? Thanks for the quick response, btw For example, #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 633, 441, 193, 133) $Label1 = GUICtrlCreateLabel("", 132, 104, 76, 84) GUICtrlSetBkColor(-1, 0x0054E3) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd And I just want to resize $Label1 Edited April 30, 2008 by Jrowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
smashly Posted April 30, 2008 Share Posted April 30, 2008 Hi, #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 633, 441, 193, 133) $Label1 = GUICtrlCreateLabel("", 132, 104, 76, 84) GUICtrlSetBkColor(-1, 0x0054E3) $Button = GUICtrlCreateButton("Resize Label", 5, 5, 100, 20) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button Local $CGP = ControlGetPos($Form1, "", $Label1) GUICtrlSetPos($Label1, $CGP[0], $CGP[1], Random(10, 200, 1), Random(10, 200, 1)) EndSwitch WEnd Cheers Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2008 Author Share Posted April 30, 2008 I didn't make myself clear, and I apologize. What I'm after is clicking on the border (rebar?) and dragging the corners or sides of the label to manually resize it. Thank you very much for the help so far, though! [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
ProgAndy Posted April 30, 2008 Share Posted April 30, 2008 You can let it resize with the GUI : #include <GUIConstants.au3> #region - GUI Create GUICreate('fg',-1,-1,-1,-1,$WS_SIZEBOX) $x = GUICtrlCreateLabel("jkjk",10,10,100,100) GUICtrlSetResizing(-1,$GUI_DOCKBORDERS) GUICtrlSetBkColor(-1,0xFF0000) GUISetState() #endregion #region - GUI SelectLoop While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd #endregion *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2008 Author Share Posted April 30, 2008 Aye, yeah. However, I want to have 16-20 draggable, resizable boxes on the form, something like the GUI designers. I basically want it as a layout tool, and I was thinking it wouldn't be too complex if I could find some control that already did what I wanted it to Thanks for the help, so far, but it's still not quite what I'm looking for. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2008 Author Share Posted April 30, 2008 http://www.autoitscript.com/forum/index.ph...st&id=14990That's what I was looking for draggabe and resizable controls.Much thanks to those who pitched in! [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] 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