RE: XForms: Text and literal at sign:

Michael Glickman (michaelg@linx.com.au)
Thu, 9 Sep 1999 14:02:12 +1000

# To subscribers of the xforms list from Michael Glickman <michaelg@linx.com.au> :

Hello again

> Sorry, I could figure that from your previous email. I simply was not
> patient enough
> to read it thoroughly. You probably have several fields in a column
> and want all to
> be aligned - I would also be desperate in this case.
>
> Untill next release of XForms with provision for @@, let's see how we
> can manage it. Consider the following ideas:
>
> 1 - using X-call for drawing label text
> 2 - using fl_add_symbol
>
> As you understand, X-server does not have a special interpretation for
> @ character.
> Therefore, if you use X-call (XDrawImageString) it should be fine.
> However, you
> need to refresh the window all the time after it raises - this is very
> annoying.
>
> If you have only few fileds, starting with @, you can bypass this
> problem by using
> fl_add_symbol.
>
> In details:
>
> a) You introduce a new symbol, say @patch. This is set as the label
> for your object.
> fl_set_object_label (obj, "@patch") ;
>
> b) You tell Xforms that you have a routine for processing symbol
> 'patch', using
> fl_add_symbol. I don't remember the syntax, but you can take it
> from the manual.
> Roughly speaking, this call assigns a routine, responsible for
> drawing the symbol.
>
> c) In the drawing routine you identify the location of the text,
> window id, font id, etc.
> XForms provides an easy way to get in (The major thing why I like
> XForms -
> is its openess for tricks). Then you call XDrawImageString and
> here it goes.
> The main idea is that this routine is automatically called,
> whenever an object
> needs to be redrawn.
>
> Again, I need to put my hand on XForms and X11 manuals to be more
> specific.
> Ta-ta for now.
>
> Michael
>
>
> -----Original Message-----
> From: Jason White [SMTP:jdwhite@iastate.edu]
> Sent: Thursday, 9 September 1999 11:18 EST
> To: xforms@bob.usuhs.mil
> Subject: Re: XForms: Text and literal at sign:
>
>
>
> # To subscribers of the xforms list from Jason White
> <jdwhite@iastate.edu> :
>
> ># To subscribers of the xforms list from Michael Glickman
> <michg@alphalink.com
> .au> :
> >
> >Hello Jason:
> >
> >Here are good news: I tried inserting a space before @.
> >It worked and I could see @ in the text!
>
> Yes, I can see the @ sign with xforms 0.88 under Linux and Digital
> Unix.
> What's sort of annoying is that I see the space too. Example: I'm
> writing
> a program that displays @xxx, where "xxx" is three numeric digits like
> "123". By placing a space before the @ sign I now get " @123" and
> what
> I'm looking for is just "@123". I know it sounds like I'm being
> obnoxiously picky, but I had high hopes that there was a simple
> solution
> for displaying text that started with an @ sign.
>
> Thanks for the suggestions.
>
> -Jason
>
> >Jason White wrote:
> >
> >> # To subscribers of the xforms list from Jason White
> <jdwhite@iastate.edu> :
> >>
> >>>> I've been trying to figure out how to display a literal at (@)
> sign as
> >>>>a button label using the function fl_set_object_label().
> >>[...]
> >>>
> >>>Add a leading blank:
> >>>
> >>> " @"
> >>
> >> This solution does keep the forms library from complaining, but
> the
> >>space shows up in the label as well which isn't desirable. Any
> other
> >>solutions?
>
>
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/