Jump to content
Sign in to follow this  
orange

SciTe Question: Can the Main Program be collapsed?

Recommended Posts

orange

Basically just that -- I ahve a GUI that is about 400 lines to setup, so I would like to condense it like you can with loops and functions.

is there a way to do this?

Share this post


Link to post
Share on other sites
Jos

Basically just that -- I ahve a GUI that is about 400 lines to setup, so I would like to condense it like you can with loops and functions.

is there a way to do this?

As in "View/Toggle all folds" ?

:D


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
MHz

#region

#endregion

will collapse with folding in Scite4AutoIt3 Maybe like you mention with collapse...

Edit: Like folds I thought JdeB :D

Edited by MHz

Share this post


Link to post
Share on other sites
Uten

Refactor and structure your code!

Use regions. :D

#region - Global declarations
Global $guiMain, $ctlInput, $ctlLable
#endregion - Global declarations
; Include stuff
Main()
Exit
Func Main()
While 1
    $msg = GuiGetMsg()
    If $msg = 0 Then 
        Sleep(250)
    Else
        GuiMsgCracker($msg)
    EndIf
WEnd 
EndFunc 
Func GuiMsgCracker($msg)
    Switch $msg                   ;Switch requieres beta
            ;;;Do your stuff
        Case Else
    EndSwitch 
EndFunc

EDIT: Also remember CTRL+ALT+ LEFT_CLICK on a +/- in the sidebar of the code will fold all subfolds. CTRL+SHIFT+LEFT_CLICK does something else.

Edited by Uten

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.