As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I'll use a simple example o describe my issue, since it may be harder to describe with the actual code.
I have a combox where each line item is a concentenation of 2 fields. The physical appearance of the length of the 1st field will vary because either the character length is different (ex: 12 vs. 978), or the character spacing is different (ex: lll vs. WWW), or both.
My dropdown list currently looks something like this:
AAA - this is tiem one 111 - this is item two 1S - this item three
I want it to look like this:
AAA - this is item one 111 - this is item two 1S - this is item three
I've tried a few things, but to no avail. My greatest concern is there is nothing I can do about the variance in character spacing.
I was thinking that if I inserted a TAB between fields, as long as the 1st field did not exceed the TAB size, the 2nd fields would line up evenly.
compute r/i4 = StkList.FocCount; repeat while r GE 1; Compute StkCodeList(r).CodeWithDescription = ' ' | StkCodeList(r).CLASS_CODE | TABB | ' - ' | StkCodeList(r).CLASS_DESC; compute r=r-1; endrepeat
But the TABB is replaced with a space, not a tab, and the second fields remain misaligned. And even if it did create the tab, I fear it still may not correct for a differnece in character spacing.
Any suggestions?
Thanks, GeorgeThis message has been edited. Last edited by: Kerry,
The only thing you can do is to use a monospace font for this control, e.g. Courier New, but only if the correct number of spaces fill up the left side of that display value, i.e., two spaces after 1S
1S - this is item three
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Well... 2. If you are using a DEFINE to concatenate and simple concatenate (| and not ||), then the blanks will be kept with a monospace font, so 1. The user will be happy with what he gets and shouldn't care about what he sees.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Since it looks like you are using a Maintain form, a lot of time I'll use an HTMLTable to display multiple columns instead of a drop down box and just set a hiperlink on the first column.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
@Danny-SRL Thanks for the suggestion. The user cares less about the misaligned fields in the dropdown box, than the font. This is one of many forms sharing the Arial font. Making this one form, or dropbox, monospace may be distracting and raise more questions than necessary.
@Maintain Wizard Sounds like a good alternative, but will be inconsistant with the way other data is entered into the form; there are 2 other dropdowns on the same form. It also sounds like I may need to rearrange other controls to accommodate the HTMLTable. Again, this may be distracting and raise more questions than necessary.
I will double-check with the user, and if he's okay with its present appearance, I'm done; otherwise, I will revisit both your suggestions.
If you are delivering the result to an html browser you can embed non-breaking spaces, which use the text
& n b s p ;
. . . to represent a blank character in your browser. Putting that string in instead of your tabs will allow you to get the indentation. You'll have to be creative to figure out how many spaces you need depending on the length of your character string.
In FOCUS this is trickier since it wants to use the string as an amper-variable. I get around that by setting the value as
BLANKSPACE/A6 = '&' | 'nbsp;' ;
There is an escape character that allows you to avoid the two-part assembly, but I can never remember what it is.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
Thanks John. I'm thinking that's only half the solution. By that I mean it solves this problem:
xxx - abcde xx - abcde
But it doesn't solve this problem:
WWW - abcde ll - abcde
In other words, the physical spacing appearance of lll is different from WWW even though they're both 3 characters long. The spacing is only equivalent if a monospace font is used. From my research they're only a few tags that can be used within