[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

915.0. "Query on Session Managers Header Text area size" by EWBV04::NAGANO (Yuji Nagano , CSC/TOKYO) Fri Jun 09 1989 06:00

	I tried to input long message text (about 50 characters) in the
	Header Text field of the Customize Session Manager.
	But, I could not see entire message on the Session Manager's message
	area.  The top part of the message was cut.
	Does Session Manager have message text size limit ?

	Thanks in advance,

		Yuji Nagano

T.RTitleUserPersonal
Name
DateLines
915.1LESLIE::LESLIEAndy ��� LeslieFri Jun 09 1989 06:2013
    Well I have
    
               "A Massage from the Swedish Prime Minister"
    
    so 41 is okay :-). Have you tried making the window larger? The header
    text is probably defined as a proportion of the overall width and thus
    would only show a certain amount of the text.
    
    - Andy
    
    P.S. It's a Monty Python quote and if you don't know what one of those
    is, sorry.

915.2I could get entire message !!EWBV04::NAGANOYuji Nagano , CSC/TokyoFri Jun 09 1989 07:4012
	Thank you for quick response.
	I tried making window larger and I could see entire message.
	But, I think the Session Manager's header message area has
	available space in right side at constant length.  	
	Is this caused by text centering function ?


	  Thanks,

		Yuji

915.3I think this might be the problemNEURON::NICHOLSONA belly as big as an oil spillFri Jun 09 1989 14:0942
    I think I can identify some of the problem Yuji is talking about.
    
    In looking at the code, here's what's happening (at least to my
    understanding):
    
    In CREATEPANEL (where the session manager panel gets created) it
    creates an ADB to hold the label (the header text) and a text widget
    for messages.  The label for the header text is created with the
    following args: 
    	
    	left attachment = attach positon (specified as 50 or in other
    	    words, the middle of the box)
	top attachment = attach adb (with a small offset)
    	a translation table which causes a routine to get called for
    	    MapNotify events
    
    The map routine checks to see if this is the first time the label
    has been mapped and if so it:
    
    	calls XtGetValues to get the width of the label widget 
    	calls XtSetValues to set the adbLeftOffset to -(width/4) in
    	    an attempt to center the label
    
    Two problems I've witnessed with this are:
    
    	if you're using 75dpi font (default) and your text is too long,
    	it appears that the value calculated for adbLeftOffset is too
    	large a negative number and is ignored, causing your label to
    	start in the middle of the box
    
    	if you're using 100dpi font, then you get different problems
	and the centering algorithm never works correctly.  I'm guessing
    	this is because width of the label widget comes back in pixels
    	and adbLeftOffset is interpreted as font units by default (and
    	with 100dpi you've got a larger font).

    I'm not sure I have all this correct, but I think I've got the jist
    of it.
    
    Mark
    p.s. (Hi Yuji!  Tell Toru hello for me)