Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Detecting if a GUI Control has been selected (https://forums.graalonline.com/forums/showthread.php?t=74060)

godofwarares 05-19-2007 03:04 PM

Detecting if a GUI Control has been selected
 
How would I do this? (read the title)

Skyld 05-19-2007 03:11 PM

Do you mean if a window control is on focus, or if an item is selected from a list, ..?

Twinny 05-19-2007 03:13 PM

You could try obj.isfirstresponder(); - i think this will return whether it is selected or not.

godofwarares 05-19-2007 03:14 PM

Quote:

Originally Posted by Skyld (Post 1309468)
Do you mean if a window control is on focus, or if an item is selected from a list, ..?

Like when a GuiTextEditCtrl gains focus. I want it so that when the player clicks the box / presses Tab and the edit box gets focus, It selects all the text.

[PS: I already know of that function. setSelection(begin, end);]

Edit:
Quote:

Originally Posted by Twinny (Post 1309469)
You could try obj.isfirstresponder(); - i think this will return whether it is selected or not.

That worked :]


All times are GMT +2. The time now is 03:58 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.