Dear friends, how to hide a TFolder page?
Thanks in advance.
EMG
Dear friends, how to hide a TFolder page?
Thanks in advance.
EMG
I think it not possible
I think tfolder page can be enable or disable ....
I think it not possible
I think tfolder page can be enable or disable ....
but each dialog can be an control ..I don't Know...
Hello Enrico,
I use this turn-around to do it.
Imagine to have a folder oFld with 3 pages: "Folder1","folder2","folder3"
then you can "hide" the folder2 at runtime with:
oFld:SetPrompt("Folder1","","Folder3")
oFld:aEnable[2]:=.f.
Marco Turco wrote:Hello Enrico,
I use this turn-around to do it.
Imagine to have a folder oFld with 3 pages: "Folder1","folder2","folder3"
then you can "hide" the folder2 at runtime with:
oFld:SetPrompt("Folder1","","Folder3")
oFld:aEnable[2]:=.f.
Enrico,
We need to implement a new method for it, as the dialog for the folder page to hide should be removed from oFld:aDialogs.
We can't simply hide it, as the folder uses the hide and show to select them.
Also, the prompts have to be modified.
I need to create or not, some dialogs depending the rights accesss.
I do this with TPages, but is very similar code:
Add -> DEFAULT aDialogs := {} // In method Redefine
And at dialog creation:
n := 0
DEFINE DIALOG oDlg;
RESOURCE "FICHA";
TITLE "Title"
REDEFINE PAGES oPages;
ID 999;
OF oDlg
If ChkRights() // Check security access
n++
aAdd(aItems, "Datos personales" ) // manually add the dialog
aAdd(oPages:aDialogs, {})
DEFINE DIALOG oPages:aDialogs[n];
RESOURCE "FICHA_01_DATOS01";
OF oPages
REDEFINE GET oGetLegajo;
VAR oDbf:Legajo;
ID 1;
OF oPages:aDialogs[n]
EndIf
This work fine for me.
Best regards!
Antonio Linares wrote:Enrico,
We need to implement a new method for it, as the dialog for the folder page to hide should be removed from oFld:aDialogs.
We can't simply hide it, as the folder uses the hide and show to select them.
Also, the prompts have to be modified.
FUNCTION FLDHIDEITEM( oFld, nItem )
LOCAL oDlg := oFld:aDialogs[ nItem ]
ADEL( oFld:aPrompts, nItem, .T. )
ADEL( oFld:aDialogs, nItem )
oFld:aDialogs[ LEN( oFld:aDialogs ) ] = oDlg
RETURN NILEnrico,
> ADEL( oFld:aPrompts, nItem, .T. )
> ADEL( oFld:aDialogs, nItem )
I am assuming the third parameter shinks the array? If so, don't you also want to shrink aDialogs?
This function is more like a FldDeleteItem() since you can't decide to later show it again.
Regards,
James
James Bott wrote:I am assuming the third parameter shinks the array?
James Bott wrote:If so, don't you also want to shrink aDialogs?
James Bott wrote:This function is more like a FldDeleteItem() since you can't decide to later show it again.