| View previous topic :: View next topic |
| Author |
Message |
yolodrew Newbie
Joined: 09 Mar 2009 Posts: 5 Location: Tehachapi, CA
|
Posted: Mon Mar 09, 2009 6:10 am Post subject: Help with Table element click function |
|
|
Hello, I think this is a simple question and I apologize if it has already been covered, but I've searched the forums and I'm stumped. Here is my dilemma, I've created a table dialog element using the following syntax:
DIALOG ADD,TABLE,LIST1,160,26,753,393,Tractlot[75]|Owner[170]|Address[60]|Lotparcel[110]|Home Phone[87]|Work Phone[87]|Tenant[140],,CLICK,COLUMNSORT,style1
And I'm trying to catch any click events with the following:
:list1click
%%ITEM = @item(list1)
if @not(@null(%%ITEM))
info %%ITEM
END
This works well if you click on the first column in the table, in this case "Tractlot", if you click on any other column the click event (%%ITEM) is null, is there any way I can extract the data in the first column in a row that is clicked on to populate the click event, regardless of which column you click on in a single row?
I am using @tab() to populate the table list. eg. :
LIST ADD,list1,%%TRACTLOT@tab()%%OWNERNAME@tab()%%ADDRESS@tab()%%LOTPARCEL@tab()%%HOMEPHONE@tab()%%WORKPHONE@tab()%%TENANT
Any guidance is very much appreciated.
Thank you. |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Mar 09, 2009 2:19 pm Post subject: |
|
|
yolodrew,
Unfortunately this is not a grid element. This is actually a Windows Listview control. If you need a grid type of control take a look at vdsobj.dll _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Tue Mar 10, 2009 11:46 am Post subject: |
|
|
yolodrew,
Remove the style from the table add line.
EDIT, hmm scratch that. Your code works ok for me, with or without a style.
| Code: | DIALOG CREATE,New Dialog,-1,0,804,580
DIALOG ADD,STYLE,STYLE1,,,U,,
DIALOG ADD,TABLE,LIST1,160,26,753,393,Tractlot[75]|Owner[170]|Address[60]|Lotparcel[110]|Home Phone[87]|Work Phone[87]|Tenant[140],,CLICK,COLUMNSORT,STYLE1
DIALOG SHOW
LIST ADD,list1,TRACTLOT@tab()OWNERNAME@tab()ADDRESS@tab()LOTPARCEL@tab()HOMEPHONE@tab()WORKPHONE@tab()TENANT
LIST ADD,list1,TRACTLOT-2@tab()OWNERNAME-2@tab()ADDRESS-2@tab()LOTPARCEL-2@tab()HOMEPHONE-2@tab()WORKPHONE-2@tab()TENANT-2
LIST ADD,list1,TRACTLOT-3@tab()OWNERNAME-3@tab()ADDRESS-3@tab()LOTPARCEL-3@tab()HOMEPHONE-3@tab()WORKPHONE-3@tab()TENANT-3
LIST ADD,list1,TRACTLOT-4@tab()OWNERNAME-4@tab()ADDRESS-4@tab()LOTPARCEL-4@tab()HOMEPHONE-4@tab()WORKPHONE-4@tab()TENANT-4
LIST ADD,list1,TRACTLOT-5@tab()OWNERNAME-5@tab()ADDRESS-5@tab()LOTPARCEL-5@tab()HOMEPHONE-5@tab()WORKPHONE-5@tab()TENANT-5
:evloop
wait event
goto @event()
:list1click
%%ITEM = @item(list1)
if @not(@null(%%ITEM))
info %%ITEM
end
goto evloop
:close
stop
|
_________________ cheers
Dave |
|
| Back to top |
|
 |
yolodrew Newbie
Joined: 09 Mar 2009 Posts: 5 Location: Tehachapi, CA
|
Posted: Tue Mar 10, 2009 3:27 pm Post subject: thanks |
|
|
Thank you for the replies, l will take a look at vdsobj.dll
Thanks,
Andrew |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Mar 10, 2009 5:48 pm Post subject: |
|
|
| DaveŽ wrote: | yolodrew,
Remove the style from the table add line.
|
Dave,
This issue is not that yolodrew can grab the value being returned the issue is that the VDS Table does not let you click on a single cell in the table and return just that value. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
|
| Back to top |
|
 |
yolodrew Newbie
Joined: 09 Mar 2009 Posts: 5 Location: Tehachapi, CA
|
Posted: Wed Mar 11, 2009 1:39 am Post subject: Thank again! |
|
|
Claz, thank you, I particularly like the full row select!
Adnrew |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|