mdes Posted May 16, 2005 Posted May 16, 2005 In my application, I draw a lot of labels (+ a tooltip for every of each). I would like to delete all of them; is there another way instead of keeping in an array all the returned controlID, and to loop on all GUICtrlDelete()? In fact, I would like to erase all the labels, but this cannot be done without GUICtrlDelete(). Thanks for any advice Gestion des congés, RTT, vacances scolaires, autres absences sur Pocket PC : CongésRFV
buzz44 Posted May 16, 2005 Posted May 16, 2005 I would think keeping an array is the only way. Dim $label[4] $label[0] = GUICtrlCreateLabel() $label[1] = GUICtrlCreateLabel() $label[2] = GUICtrlCreateLabel() $label[3] = GUICtrlCreateLabel() $label[4] = GUICtrlCreateLabel() For $I = 0 to UBound($label) - 1 GUICtrlDelete($label[$I]) Next qq
steveR Posted May 16, 2005 Posted May 16, 2005 (edited) In fact, I would like to erase all the labels, but this cannot be done without GUICtrlDelete().If you just want to erase the text of the label, tryGuiCtrlSetDate($ctrlID, "") Edited May 16, 2005 by steveR AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass.
mdes Posted May 16, 2005 Author Posted May 16, 2005 If you just want to erase the text of the label, tryGuiCtrlSetDate($ctrlID, "")Not enough, I will have to delete also the Tips.So, I will delete them with an array and a For Loop I would like to have something like For each $label in gui.Labels or GUI.Labels.Collection.Clear : Don't forbid me to dream Thanks for yours contributions Gestion des congés, RTT, vacances scolaires, autres absences sur Pocket PC : CongésRFV
steveR Posted May 16, 2005 Posted May 16, 2005 (edited) The same with tips;GUICtrlSetTip ( $controlID, "" )Just loop through them like Burrup showed. In the beta, there is a For..In structure that works with objects and arrays, but nothing like collections. Edited May 16, 2005 by steveR AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass.
mdes Posted May 16, 2005 Author Posted May 16, 2005 (edited) In the beta, there is a For..In structure that works with objects and arrays, but nothing like collections.I'm often using FOR..IN, but there is no object grouping the labels, nor the tips; so, I will keep the controlsID's in a array and delete them in a FOR GUICtrlDelete(ControlID) loop... as I said in my first post. Edited May 16, 2005 by mdes Gestion des congés, RTT, vacances scolaires, autres absences sur Pocket PC : CongésRFV
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