Jump to content
Sign in to follow this  
Champak

Place holders

Recommended Posts

Champak

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.

Share this post


Link to post
Share on other sites
LimeSeed

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

Share this post


Link to post
Share on other sites
Richard Robertson

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?

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  

×