Dialog Boxes

Rachael Sherry

New Member
Just a quick question that I hope someone can help me with.
I would like to change the title of a dialog box when a certain flag is set.
I tried to change it before the local-initialize but it changes the calling window instead.
Does anyone have any ideas.
Also
I would like to assign the dialog box to a widget handle so I know if it is already open and not to call it again.

I would really appreciate the help.
Thanks
Rachael
 
Hi Rachael,

A small stupid program but I hope it helps.

DEFINE VARIABLE l AS LOGICAL NO-UNDO.

DEFINE FRAME Frm
l LABEL "Test Field" VIEW-AS TOGGLE-BOX
WITH CENTERED VIEW-AS DIALOG-BOX.

ON VALUE-CHANGED OF l IN FRAME Frm
DO:
ASSIGN l.
FRAME Frm:TITLE = STRING(l).
END.

ENABLE ALL WITH FRAME Frm.
WAIT-FOR WINDOW-CLOSE OF FRAME Frm.

Istvan
 

Samj

Member
Rachael

I believe that the dialog box is a frame not a window. So that:
ASSIGN
{&WINDOW-NAME}:TITLE = "NewTitle".
Will actually change the parent window's title.

Try assigning {&FRAME-NAME}:TITLE = "NewTitle".


Don't know if this sample is what you were looking for or not on the duplication question.

IF NOT VALID-HANDLE(hProc) OR hUniqueID <> hProc:UNIQUE-ID THEN
DO:
RUN dialog.w PERSISTENT SET hProc.
IF VALID-HANDLE(hProc) THEN
ASSIGN
hUniqueID = hProc:UNIQUE-ID.
END.
ELSE IF VALID-HANDLE(hProc) THEN
RUN proc-name IN hProc.

Good luck,

Sam
 

Rachael Sherry

New Member
dialog boxes - persistent set

Hi Guys
Thanks for you help on the dialog problem. I got the title part to work but when I tried to use persistent set against the dialog box I got the following error and then the system crahsed.

' A Smart object is not intended to be run persistent or to be placed in another smart object at AppBuilder design time ' .


Any ideas.
Thanks
Rachael
 
Top