🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1610

Menubars and FieldEditors

#1610
From: amy m wong
Date: Tue, 05 Jan 1993 18:55
78 lines
2750 bytes
I've been struggling with two problems that I can't resolve.

1) I have a simple question about appending MenuItem objects
to menubars.  I want to know how to append a menu item to
the far right of a menubar.  It seems that Menu automatically
sticks a hglue() at the end of  a given menubar.  Thus, the 
last menu item can never be right justified. 

It should simple to do, but nothing seems to do the trick.
Beside generating a whole new derived class, there must
be an easier way.


2) I'm also having problems with the FieldEditor.  I noticed that
a previous posting mentioned this problem, but I never found the
solution.  Below is a reprint of the problem.


; Article 4094 of comp.windows.interviews:
; Subject: 3.1B FieldEditors
;
; I need some help with FieldEditor.
;
;I am using version 3.1 Beta of InterViews.  I'm trying to create a popup
;containing a FieldEditor and have the FieldEditor receive all keyboard
;events as long as the mouse is within the popup.  A sample of my code is:
;
;void
;Sample::CreatePopup()
;{
;    WidgetKit* kit = WidgetKit::instance();
;    Style* style = new Style(kit-;style());
;    style-;attribute("name", "sample");
;    LayoutKit* layout = LayoutKit::instance();
;    DialogKit* dialog = DialogKit::instance();
;    FieldEditor* ed = dialog-;field_editor(String("Sample Entry"), style);
;    InputHandler* h = new InputHandler(
;	kit-;inset_frame(
;	    layout-;margin(
;		layout-;hbox(
;	    	    layout-;vcenter(kit-;label("Label: ")),
;		    layout-;vcenter(ed)
;		),
;		20, 20
;	    )
;	),
;	style
;    );
;    h-;append_input_handler(ed);
;    h-;focus(ed);
;    window = new ApplicationWindow(h);
;    window-;style(style);
;    window-;map();
;}
;
;This creates the popup with the field editor but the editor only accepts
;keyboard input while the mouse pointer is on the editor itself or the label.
;It does not accept input if the mouse is in the margin around the label/editor
;box.
;
;Am I missing something?  The field editors in doc seem to work correctly and
;I modeled this code after doc's dialogs.c file.  Any suggestions would be
;appreciated!



By the way, I'm currently using Version 3.0.1 (if that helps any).


Thanks.




;---------------------------------------------------------------------------<
Ben Dai						byd999@unagi.measurex.com
Measurex Corporation
Cupertino, CA
Technical Details
Message-ID: <810@mesrx.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!mesrx!amw116

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mesrx!amw116
From: amw116@mesrx.com (amy m wong)
Newsgroups: comp.windows.interviews
Subject: Menubars and FieldEditors
Message-ID: <810@mesrx.UUCP>
Date: 5 Jan 93 18:55:21 GMT
Sender: amw116@mesrx.UUCP
Distribution: world
Organization: Measurex, Corporation    "The Results Company"
Lines: 78