Not able to display long text string in status-area of a window created in Progress 4GL - progress-4gl

It seems like we can not display long text strings in status-area of a window.
I want to display text string long enough to cover complete screen in status-area of window.
Is there any simple way or using windows API's?
Please help.

I assume you are using STATUS DEFAULT or STATUS INPUT statement. The documentation says that the string is limited to 63 characters. This seems like a legacy from the TTY times where parts of the status bar might have been used to indicate key states etc..
I guess you'll have to build your own status bar (turning off the default status bar using STATUS-AREA attribute). Or use an Active X or .NET Control instead.
I'd prefer the use of a .NET Control.

As for me I just use a disabled fill-in at the bottom of the window, with the resize magic (if needed) and a simple API to display text within.

Related

Display static, selectable text in GTK app

I am trying to build a small GTK 4 app where the user inputs some data, the program does some computations, and it outputs results in a tabular format.
Currently, I have implemented this using a GtkGrid with Label objects showing the results. This works, but a major downside is that the text is not selectable by the user.
Is there a standard Gtk interface for outputting static, selectable text or tables? For example, in the Firefox (whose Linux version is based on GTK) settings page, you can use the cursor to select all the explanatory text.
Searching for "text" in the GTK documentation brings me to the Text Widget Overview page, which is all about multiline text editing. But I don't want my output to be editable—I just want the user to be able to highlight the text and paste it somewhere else if they want.
GtkLabel has a "selectable" property which does just that. It's also mentioned in a separate section of the GtkLabel docs

Rich text components in Flutter

I would like to make a hybrid app using Flutter. One particular kind of component I'm looking at sounds something like this:
A Chinese character like 家 (which means home) is shown
When an user clicks on the character, it can display its pronunciation (jia)
The user also has the option to click to play the pronunciation
The user can also choose to open a window where an animation of how the character is being written is played.
So for a sentence like: 蓝天是白云的家(literally translated as: The blue sky is the home of the white clouds), each of these 7 characters can be individually clicked and users can choose to display / play pronunciation / show how they are written.
Normal static text won't be rich enough to display all these information. My current idea is to make every character a customized widget with such data embedded within.
This task can be quite huge if each Chinese character (there are approximately 5000 characters that are commonly used) has its own rich data format.
Any suggestions on how to approach this problem in an efficient manner in Flutter?
Thanks in advance!
There are a few ways to do this. Using widgets could definitely be an option, but that's probably going to cause you issues in the long run.
Let's break this into two parts:
1: Displaying the text
Instead of using widgets, I'd suggest using a RichText with many TextSpan children. You could create a custom class that accepts the string, splits it into characters, and puts each character in its own TextSpan. By using TextSpan.recognizer. You could then either use a TapGestureRecognizer with onTap to show the information when tapped if you don't need the position at which it was tapped, or onTapDown/onTapUp if you do (for example if you want to show a popup right where the click happened as opposed to something like a bottom sheet that comes up).
2: Showing the information
Because you're wanting to deal with a large amount of characters, I'd suggest not doing it all in code but instead handling the characters in some other sort of format that can easily be manipulated, for example JSON. That way you can do things like splitting the data it into blocks and loading them as needed, and/or getting them from a web server.
Your data could look something like:
{
"家": {
"pronunciation": "jia",
"audio": "path/to/sound.m4a",
"animation": "path/to/animation.gif"
},
...
}
You could theoretically even do things like start loading the pronunciation files when the character is first shown or when they click on it.
When the character is tapped, you could:
check if data in cache
load the data if needed from network/disk
open bottom sheet or popup displaying the pronunciation info + buttons for audio & drawing animation

When using a browser in my progress application the scroll bars never work correctly

When using a browser in my progress application the scroll bars never work correctly. It will show that I can only scroll down a little but then keeping going. Is this a bug in progress or is there something I can do to fix this problem?
define query browse-4 for customer.
DEFINE BROWSE BROWSE-4
QUERY BROWSE-4 NO-LOCK DISPLAY
custNum name
/* ENABLE name */
WITH NO-ROW-MARKERS SEPARATORS SIZE 32 BY 6.46 FIT-LAST-COLUMN.
.
open query browse-4 preselect each customer no-lock.
enable browse-4.
wait-for window-close of current-window.
You can adjust the MAX-DATA-GUESS property for the browse. You can get the value from NUM-RESULTS after the preselect query has been opened. Or you can set it to a suitable guesstimate without using preselect.
Keep in mind that using preselect causes every record to be read instead of just enough to fill the first browse window. That is potentially a lot of extra DB reads and network traffic just to get the scrollbars correct.
You may be confusing the scrollbar on the containing frame with the scrolling of the browse.
Do you see two boxes outlining the browse? If you add "with no-box" to your "enable" does the scrollbar that is bothering you go away?
If it does then the problem is that your containing frame (which is the default un-named frame because you have not specified a frame phrase with the ENABLE) is smaller than the browse viewport. So you are seeing a scrollbar on the FRAME, not on the BROWSE, that is trying to tell you that you can scroll the frame up and down to see the complete viewport of the browse. The browse may also scroll within that containing frame depending on how much data there is.
If you are running this code in a character (Unix) environment you should also be aware that many GUI features of the BROWSE are not available. Especially anything related to appearance. Like scrollbars.
This is a known "feature" of Openedge GUI, unfortunately.
The position of the slider on the right of the browse is not directly related to the number of records in the query, but to the "Max Data Guess" property of the browse.
You can set this value yourself in the property dialogue for the browse widget (it's just below the "query" editor, in v10 at least).
Just set it to a really big number (say 10,000) and the browse will behave as it should.
the main problem for my question is mainly ,i am deleting temptable before completing the excecution,that is the main reason for the vertical-scrollbar is not working,after eleminating this temp-table deletion statements .automatically vertical-scrollbar is working.
for each ttdummy:
delete ttdummy.
end.

How to deal with over-long navigation bar titles?

In my iPhone app, my navigation bar titles were often too long for the page, causing them to truncate (I usually have a button either side of the title, so space is limited). I therefore created my own title labels with a hard-coded font size so the text would shrink accordingly. However, I now realise that this wont neccesarily look right when other languages are chosen.
What is the normal practice for this? Do people just accept a truncated title, or reduce the font size accordingly (for English), or enforce a very short title that will be short enough in all languages?
I don't think there's a magic solution here. You just need to pick shorter titles or accept the truncation. You can always put the full text in the display rather than in the title bar if necessary.
Based on feedback from some users, I wouldn't go down the route of using smaller text. (I'm basing this on a toolbar at the bottom of the screen rather than the title bar, but the same principle applies.)
I chose one title that is short enough for every language and display it regardless of what the view controller shows.
Apple shows as a title what the view controller shows: in the iPod app, for instance, when you select a playlist, the whole name is displayed. If it is too long, it gets truncated.
So I think it is ok to show a truncated title. You should not however make the text smaller as it will get too hard to read.
Thought it would be relevant to contribute to this discussion with a great solutoin that I came across in one of the apps I've been using.
https://itunes.apple.com/in/app/bookmyshow-movie-event-play/id405894842?mt=8
These guys animate the title left and right within the titleview's bounds, if the title text is too long. Looks neat and elegant without truncation, smaller text or other hassles.

How to use customized tool bar in tiny mce?

I'm using tiny mce in one of my projects and client do not want to use the Horizontal tool bar of tiny mce. He wants a centralized custom tool bar from where user can control all the properties like text color, type of text, size, back grounds and every thing that is needed to do while designing a web page using templates. I configured the mce instance with out its default tool bar and controlled the properties from the customized tool bar. And the properties are applied to the tiny mce instance as a whole. But now, the requirement has come up that, the text editing should be in MS office style.That means, if user has placed cursor at one place and changes color, nothing will be affected, but if he starts typing from the cursor position the text should have the color which was set recently. I tried to use the external tool bar option. But, my work area and customized tool bar are at different z index levels. So, positioning the tool bar fails. If I append the tool bar to my customized tool bar, it is not click-able. So, how to invoke tiny mce's core functionality using customized tool bar?
Or, Kindly suggest, should I change editor ? Then, which one should I go for ?
EDIT
As per the suggestion, I'm writing the function save the property styles and insert the span at caret position. But I'm facing some problems and could not do it after spending whole day. I could add span at caret position by using following code.
marker = ed.selection.getBookmark();
ed.selection.moveToBookmark(marker);
tinyMCE.execCommand('mceInsertContent',false,'<span id="mytitle"></span>');
But still, I failed to type inside the new span. Also, I could not figure out how to set styles to this span.
If your aim is to have your tinymce behave like MS Office you should write an own plugin which will take care of this.
I suggest if a user has placed the cursor at one place and changes color you save this color as a setting to your tinymce instance like: ed.color = 'choosencolor';
When the user start typing now you can insert a span on the first keystroke and set the color as css class or style property to this span.