It is known thing but not VERY VERY known :-] , so it can be useful to anybody.
If you use tabs/rows on your forms and want to switch tabs/rows programmatic don't think that it difficult, it is very easy, couple clicks and couple lines of code.
So let's start, 'go go go' as we say :) !
1) Go to the property of table, open 'Table Programming' tab (the last one) and give the name of the whole table (Name/ID tag), also please give the name to all rows you want to switch using your code (Row Tags, Name)
2) Now let's go to the property Table Rows and select "Switch rows programatically" (otherwise it will not work, even if you cast magic), also enable 'show the tabs so user can pick row'.
3) Add field to the form with name = Name/ID tag and add prefix $. (f.x. if you called your table MainTable, field should be $MainTable, the purpose of this field is to contain name of row we need to show).
4) Now do your code, here is example of button/event
FIELD $MainTable := "Content";
@Command([ViewRefreshFields])
That's all.
2 comments :
Dont't forget to tell you have to do some "tricks" in readmode :-)
it does work, even if we do not create a field explicitly with Table name/ID
Post a Comment