Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
Hello, I am writing an application which contains a login window. Once the user logs in, I would like the login window (a dialog_box) to be gone forever. The box itself will be gone forever by doing a XtUnmanageChild on it, but the title bar will always be under the title bar of the window that pop ups after the user logs in. (you can see this by clicking on the icon next to the size icon (I am not sure what it is called) as in when you click, the login title bar appears.) I have tried playing around with XtCreateApplicationShellWidget but have had no luck. The other problem with it is that when you click on the title bar and move down, another copy of the user window is underneath (or is created) and more, you can keep doing this. Does anyone have any programming suggestions on how to get the login window and the login title bar to disappear forever and not cause any other problems...??? I appreciate any comments, suggestions,hints or examples.. Thank you, Chris
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2106.1 | XtPopup and XtPopDown? | LEOVAX::TREGGIARI | Tue Jan 23 1990 09:25 | 4 | |
If you are putting a Dialog Box inside of an application shell widget, try calling XtPopup to make it appear and XtPopdown to make it disappear. Leo | |||||
2106.2 | No can do | TOWNS::RUFFIEUX | Tue Jan 23 1990 10:50 | 5 | |
re 1 I tried this and was unsuccessful. I am probablly doing something wrong. Does anybody have any other suggestions or examples? | |||||
2106.3 | Are you popping the right widget? | DECWIN::KLEIN | Tue Jan 23 1990 10:59 | 9 | |
What does you code look like now? Perhaps you didn't get the full meaning of Leo's reply. You should be calling XtPopup and XtPopdown on the *shell*, not the dialog box. To get to the shell you can do XtParent(dialogBoxW). Let's see some code. This should be a very easy thing to do. -steve- | |||||
2106.4 | Heres some code.. | TOWNS::RUFFIEUX | Tue Jan 23 1990 11:52 | 84 | |
Let me show you what I am trying to do. Remember that I have a login window and a the application window (which contains a menu bar). The I am picturing this is that I will have two application shells, one for login and one for application window. I appreciate your help but please remember that I am a new DECwindows programmer... static Widget toplevel, login_level, user_level; . . toplevel = XtInitialize( "On-Line Reference Library", "class", NULL, 0, &argc,argv); XtSetArg(arglist[0],XtNallowShellResize,TRUE); XtSetValues(toplevel,arglist,1); login_level = XtCreateApplicationShell("Login window", topLevelShellWidgetClass, 0, arglist, 0); <-- its not taking this 0 argcount. It dumps. user_level = XtCreateApplicationShell("App window", topLevelShellWidgetClass, 0, arglist, 0); if (DwtOpenHierarchy (1,vec,NULL,&s_DRMHierarchy) != DRMSuccess) { printf("cant open hierarchy\n");} DwtRegisterDRMNames(regvec,regnum); if (DwtFetchWidget(s_DRMHierarchy, "ncst_main", /* login window widget name*/ login_level, &ncst_main, &class) != DRMSucess) printf("can't fetch interface"); if (DwtFetchWidget(s_DRMHierarchy, "main_dialog", /*user window widget name*/ user_level, &main_dialog, &dummy_class, != DRMSuccess) printf("cant't fetch main dialog widget"); /* at this point I have tried different things*/ XtManageChild(ncst_main); XtRealizeWidget(login_level); XtMainLoop(); o.k. when the user enters correct username and password, I attempt (in callback proc)to get rid of login window like this... XtPopdown(login_level); and manage user window like this.. XtPopup(user_level); ------------------------------------------- As you can see, this probablly makes no sense. I mean, I went from this kind of working (when I did not user XtCreateApplicationShell) except for my original note to where I am at now (no where). Thank you very much for any advice you can give.... Chris | |||||
2106.5 | Try calling XtPopup (login_level) instead of XtRealizeWidget (login_level) | LEOVAX::TREGGIARI | Tue Jan 23 1990 16:34 | 7 | |
This should accomplish getting the widget realized and mapped and work around a bug in the Intrinsics. The bug is that when realizing an application shell the intrinsics don't set a flag that XtPopdown looks at to determine if the shell is "popped-up". If you call XtPopup explicitly, you should be able to work around it. Leo | |||||
2106.6 | Finally works!! | TOWNS::RUFFIEUX | Wed Jan 24 1990 09:43 | 12 | |
re. 5 Thanks, it finally works except for a warning message that occurs when I do the XtPopdown(login_level): X Toolkit Warning: XtRemoveGrab asked to remove a widget not on the grab list. I think it may have to with the fact that I am omitting the second parameter on the Popdown.. Thanks for your help guys!! Chris. |