I set up a function to mount the cTipTool fields at runtime read in a text file.
Â
The Search function below the "OASHELP.MEM" file in the system folder: pPath + "OASHELP.MEM". You can rename this file and the path.
Â
This file must have the following composition:
[Section] -> This section should be the name of the program that creates the Dialog ProcName (1)
0000 = OK -> This first line indicates that the file is complete with OK, any other information here show the number of fields.
0001 = Text -> Enter here the text of the TipTool tget field TBUTTONBMP OR TCheckBox within or Folder Dialog
Â
When you open the Dialog system will read this file and write the TipTool fields so need not be defined in programming time, but, the staff responsible for system documentation.
Â
The Search function below the "OASHELP.MEM" file in the system folder: pPath + "OASHELP.MEM". You can rename this file and the path.
Â
This file must have the following composition:
[Section] -> This section should be the name of the program that creates the Dialog ProcName (1)
0000 = OK -> This first line indicates that the file is complete with OK, any other information here show the number of fields.
0001 = Text -> Enter here the text of the TipTool tget field TBUTTONBMP OR TCheckBox within or Folder Dialog
Â
When you open the Dialog system will read this file and write the TipTool fields so need not be defined in programming time, but, the staff responsible for system documentation.
********************************************************************************************
FUNCTION OATipTool( oDlg, cFrm ) // Monta TipTool dos Campos com base no arquivo OASHELP.MEM
********************************************************************************************
Local f:=1,g:=1,h:=1,cRes:=""
Default cFrm := ""
if !File(pPath+"OASHELP.MEM") // Verifica se o arquivo OASHELP.MEM existe na pasta do sistema
Return nil
endif
cFrm := StrTran(cFrm,'_','')
cRes := GetPvProfString(cFrm,"0000",,pPath+"OASHELP.MEM")
if Empty(cRes) // Verifica se o registro 0000 existe dentro da Seção com o nome da Tela
Return nil
endif
While f<=Len(oDlg:aControls) //acontrols é uma propriedade de todas as dialogs e é criada automaticamente
/////////////////////////////
// FOLDER DENTRO DA DIALOG //
/////////////////////////////
if oDlg:aControls[f]:ClassName()="TFOLDER"
g := 1
While g<=Len(oDlg:aControls[f]:aDialogs) // Checa todos os Dialogs da Folder
h := 1
While h<=Len(oDlg:aControls[f]:aDialogs[g]:aControls)
if oDlg:aControls[f]:aDialogs[g]:aControls[h]:ClassName()$"TGET/TBUTTONBMP/TCHECKBOX"
if oDlg:aControls[f]:aDialogs[g]:aControls[h]:cToolTip = nil
oDlg:aControls[f]:aDialogs[g]:aControls[h]:cToolTip:= GetPvProfString(cFrm,strzero(g,2)+strzero(h,2),,pPath+"OASHELP.MEM")
if oDlg:aControls[f]:aDialogs[g]:aControls[h]:cToolTip = ""
if cRes="OK" // 0000=OK quando terminar o Help da Dialog
oDlg:aControls[f]:aDialogs[g]:aControls[h]:cToolTip:= nil
else // 0000=CAD para que o sistema numere os objetos do Dialog para facilitar a edição
oDlg:aControls[f]:aDialogs[g]:aControls[h]:cToolTip:= strzero(g,2)+strzero(h,2)
endif
endif
endif
endif
h++
enddo
g++
end
/////////////////////////////
// DIALOG SEM FOLDER //
/////////////////////////////
elseif oDlg:aControls[f]:ClassName()$"TGET/TBUTTONBMP/TCHECKBOX"
if oDlg:aControls[f]:cToolTip = nil
oDlg:aControls[f]:cToolTip:= GetPvProfString(cFrm,strzero(0,2)+strzero(f,2),,pPath+"OASHELP.MEM")
if oDlg:aControls[f]:cToolTip = ""
if cRes="OK" // 0000=OK quando terminar o Help da Dialog
oDlg:aControls[f]:cToolTip:= nil
else // 0000=CAD para que o sistema numere os objetos do Dialog para facilitar a edição
oDlg:aControls[f]:cToolTip:= strzero(0,2)+strzero(f,2)
endif
endif
endif
endif
f++
End
Return nilOscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72