Jump to content

Deleting GUI items


Datus
 Share

Recommended Posts

I only seem to be able to find GUIDelete but this deletes the whole window.

Is there a way to delete individual GUI items such as GUICtrlCreatePic or GUICtrlCreateButton.

What i am trying to do is display a window full of film pictures and have multiple pages.

I thought create all items required and then delete them and then present page 2.

The only way i can think to do this is to fill the window and then use @SW_HIDE & @SW_ENABLE.

Any other idead.

We live as we dream alone!

Link to comment
Share on other sites

You could use GUICtrlSetState ( controlID, state ) and set the state as $GUI_HIDE.

As far as deleting them I do not believe you could unless you recreate the form.

Thanks for getting back to me, yes i came to same conclusion.

Just wondered if I was missing any obvious methods other people may be using.

I gues the other way is to pop the pictures into some sort of list box if at all that is posible.

We live as we dream alone!

Link to comment
Share on other sites

Thanks for getting back to me, yes i came to same conclusion.

Just wondered if I was missing any obvious methods other people may be using.

I gues the other way is to pop the pictures into some sort of list box if at all that is posible.

Sorry I edited my post, I was going threw the help file trying to find something and I did find GUICtrlDelete(controlID). Sorry the delay in editing my post.

[sub]Quantum mechanics: The dreams stuff is made of[/sub]

Link to comment
Share on other sites

Sorry I edited my post, I was going threw the help file trying to find something and I did find GUICtrlDelete(controlID). Sorry the delay in editing my post.

Brilliant, spent ages looking for that. Search for delete and everything. even on the forums.

Now i need to work out if i want to carry on with the hide or the delete.

I think delete is cleaner.

Thanks again..... Love autoit.... and the support......

We live as we dream alone!

Link to comment
Share on other sites

Great now i seem to have another problem.

I have a main window which i want to create the pictures on and a child window that I show and hide once the picture are clicked on.

Problem I have now is when I create a new picture it places them on the child and not the main.

Ive tried winactive but that doesnt seem to do anything for me.

Sorry if this is obvious but trying to finish of this program that i have spent many weeks on now.

Do i have to delete the child or is there a way to tell my program to pop the picture on the main (paraent) window.

Ok ive sorted it, even though i thought i tried it. Needed GUISetState (@SW_SHOW,$Main) just before I created any new item.

Edited by Datus

We live as we dream alone!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...