Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   GuiTextListCtrl (https://forums.graalonline.com/forums/showthread.php?t=68515)

Andy0687 09-02-2006 10:35 PM

GuiTextListCtrl
 
Hi im having a little bit of trouble understanding how to work getting the information out of the GuiTextListCtrl when I click one of the texts inside the list.

Ive got it working through the catchevent to the function but I cant figure out how to pull the text of what was actually selected out of that. The Wiki page for it also wasnt too helpful.

Any advice?

Admins 09-03-2006 01:20 AM

You mean something like this?
PHP Code:

function MyTextListControlName.onSelect(entryid,entrytext,entryindex) {
  echo(
"The player clicked on: " entrytext);


If you don't know the name of your control and use the catchevent function, then it will look like this:
PHP Code:

catchevent("MyTextListControlName","onSelect","MyEventCatchFunction");
...
function 
MyEventCatchFunction(controlobj,entryid,entrytext,entryindex) {
  echo(
"The player clicked on: " entrytext);




All times are GMT +2. The time now is 07:53 PM.

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