Jump to content

Recommended Posts

Posted

I'm setting up control place holders in my app for later upgrades so I don't have to go through the 20,000 lines of code and update things. What I'm currently doing is this:

For $i = 1 To 100
    GUICtrlCreateLabel("", 0, 0, 0, 0)
    GUICtrlSetState(-1, $GUI_HIDE)
Next

When I add a control, I just reduce the stop parameter (100) by the amount of controls added. Is there a better way to accomplish what I want? Add controls without having to go through the script and adjust things.

Posted

I'm setting up control place holders in my app for later upgrades so I don't have to go through the 20,000 lines of code and update things. What I'm currently doing is this:

For $i = 1 To 100
    GUICtrlCreateLabel("", 0, 0, 0, 0)
    GUICtrlSetState(-1, $GUI_HIDE)
Next

When I add a control, I just reduce the stop parameter (100) by the amount of controls added. Is there a better way to accomplish what I want? Add controls without having to go through the script and adjust things.

thats probs the best way, but why would you ever wanna do that? so pointless
global $warming = true
Posted

You could put an array at the top of the script with a list of function names and then Call() them all when you build the GUI. Then you can just set the functions at the bottom of the script so you only have to scroll to the top and bottom to add stuff.

Sure it sounds stupid but hey, it works right?

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
×
×
  • Create New...