Sign in to follow this  
Followers 0
fi3ldy

Overwrite text, or delete a label? :S

6 posts in this topic

Stuck, again :P!

Ok basically i have created a login form, which reads details from php which is grabbed from mysql. Now lets say i have 2 functions, LoggedIn and LoggedOut

Func LoggedOut()

$Status = "Logged Out"

$showstatus = GUICtrlCreateLabel($Status, 10, 15, 200, 20)

$username_form = GUICtrlCreateInput ("", 105, 123, 125, 19, '')

$password_form = GUICtrlCreateInput ("", 105, 123, 125, 19, '')

$submit = GUICtrlCreateButton ("Login", 55, 178, 80, 20)

EndFunc

Func LoggedIn()

$Status = "Logged In"

$showstatus = GUICtrlCreateLabel($Status, 10, 15, 200, 20)

EndFunc

Now the "logged in" and "logged out" text will just be overwritten but how do i remove the GUICrtlCreateInput (Login Boxes) and Login Button, as they stay behind the new text created when logged in, when you hover over, they appear through the new text... :D

Thanks alot guys, any help would be appriciated!

Thanks again, Danny

Share this post


Link to post
Share on other sites



Use GUICtrlSetData to update the control and show and hide the controls using GUICtrlSetState.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Use GUICtrlSetData to update the control and show and hide the controls using GUICtrlSetState.

thanks. i read up on guictrlsetdata but had no luck with it, could i have an example? :S

EDIT:!!!!! THANKS AOt, only needed to use GUICtrlSetState, works perfectly! LOVE U LOADS :P XXXX

Edited by fi3ldy

Share this post


Link to post
Share on other sites

Not really that hard if you read the descriptions for GUICtrlSetData. ControlId from the GUICtrlLabel

goes in the first parameter while the new text goes in the second parameter. Hard ? Not really.

$label = GUICtrlCreateLabel("", 10, 10, 200, 20)
GUICtrlSetData($label, "new text")

Share this post


Link to post
Share on other sites

Why have two labels on the very same spot when they do exactly the same thing...show text.

It's like having two twins which only can say one sentence each, when you could have just have

one guy instead which can speak an endless amount of sentences in basically any language.

Make yourself some good habits from the start and cut down on the loving towards me until

you do.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Why have two labels on the very same spot when they do exactly the same thing...show text.

It's like having two twins which only can say one sentence each, when you could have just have

one guy instead which can speak an endless amount of sentences in basically any language.

Make yourself some good habits from the start and cut down on the loving towards me until

you do.

yeah your right :P and thanks for the help, appriciated!

Edited by fi3ldy

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  
Followers 0