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

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.

Related

Changing a timeline tracks height in Unity to save space

The tracks in my timeline are massive. If I max out the window on my 15" macbook I can see 9 tracks in total. Is it possible to change their height somehow?
I feel like this should be possible as I've seen screenshots where they are a lot smaller, but nothing I do seems to work. Zooming only works on x-axis and there doesn't seem to be any scale handles at the edge of the tracks...
Use Crtl + mousewheel to change height of track...
I just ran into this problem, too. Although there seems to have no direct way to change the track height, I found a way modify the preference file of Timeline editor.
Find a file located under your project's Library/Timeline folder (its name should be xxxxx.pref), open it with a text editor, change the number after trackScale to 1, and you should be fine.
Screenshot: Timeline preference screenshot, the left one has trackScale of 1, whether the right one has trackScale of 3.79
You can scroll through using mouse wheel.
Last time I checked, the height was not changeable. You may have seen Track Group.
Also, a good idea is to group the tracks. To add a Track group, click the Add button and select Track Group from the Add menu. You can also Right-click an empty area of the Track list and select Track Group from the context menu.
More about this: https://docs.unity3d.com/Manual/TimelineOrganizingTrackGroups.html

Create a 'Group Box' in Word Userform

"Group Box", for lack of a better word: I want areas in my user form which are visually different from others, with a different background colour and a frame around them, such as is possible to create using Frame controls. However, I want none of the events of Frame controls and none of their interaction with other controls in the form.
More particular, I want to be able to tab through all text, list, combo and check boxes, regardless of their location in 'Group Boxes', in fact also regardless of the possible location of their 'Group Box' within another 'Group Box'. Most of my controls have On Enter, On Exit, On Change and On Key even procedures attached to them which may re-direct the focus to any control on the form. Doing so under the constant interference of Frame controls with their events and rules - many of them not working correctly, none of them properly explained anywhere - is a gargantuan task. The easy way would be to have the visual design capabilities only, without the "intelligence" which assumes control in a way not compatible with my own plans.
Perhaps the one feature of frames which makes them unfit for my purposes is that they act as forms within the form, meaning they appoint an ActiveControl when activated which they refuse to release when another control takes the focus outside their own frame. It is inconvenient to prevent a first control's On Enter procedure from running when any control in a frame receives the focus (different for first and subsequent times), but it's a much bigger task to deal with the selected control's On Exit event which won't fire until the form is closed, meaning it is missed when the control optically loses the focus and a nuisance when it technically does.
Is there a control that fits my needs in MS Word? Or can the Frame control be stripped of its events in some way? Could I place a Text Box, for example, in front of a Frame control without it also being "within" it?
For MS Word use a label with a background color.
For MS Access use the rectangle Object behind the controls.
First make the form background a grey color. Then add subforms(ms access) and rectangles to segment the controls.
The end effect is it looking like a paneled interface.
You can use a Frame control. Place the other controls first, then place the Frame control, and move it to the back. This should look visually identical to having the controls in the Frame.

Access Forms prevent mouse from selecting values from dropdown, force keyb input

I have a data entry form. Its properly tab indexed etc. and there are three dropdown menus which automatically unfurl with the on enter event.
No matter how much advice i give to users about using the tab key and keboard and checking what they just input.
they still insist on using the mouse to select values from the dropdown menus
the problem is that in their haste they often make mistakes as a result of using the mouse.
I would like to be able to force users to input into these fields using the keyboard.
the drop down is neccessary for users see the appropriate values for the field because the values will vary based on previous selections.
I have already tried experimenting with onclick events but to no avail.
Is there a way I can do this?
i am using access 2007 many of the users have access 2003.
Based on your comments, I would take one of two different approaches.
If your users are really comfortable with the codes AND know which ones they should use based on their previous selections, then just use text boxes instead of combo boxes. You can still put some validation code in either the Form_BeforeUpdate event or the individual control's _BeforeUpdate event.
If the users are not that comfortable, then I would suggest you have the first field in the combo boxes be the description of the code, not the code itself. So instead of choosing from 101, 102, 103 they are instead choosing from "Small", "Medium", "Large" or whatever those codes actually apply to. If you still wanted to display the codes themselves, you could do that with a separate disabled text box.
Now to answer your actual question. For the record, I highly recommend against using this approach. The simplest way I can thing of to prevent your users from using the mouse to select the combo box, would be to add a Transparent button covering the combo box.
To do this, draw a regular command button over the combo. Set Transparent = Yes, Visible = Yes, Enabled = Yes, Tab Stop = No.
When users click on the combo now, they will actually be clicking on the Transparent button and nothing will happen. The ONLY way they will be able to get into the control is by tabbing from a neighboring control or using a hotkey (via '&' in attached label).
Once they enter the control via Tab and your code forces a dropdown, they will still be able to choose an option using the mouse. But by forcing them to use the keyboard initially, it will make it much more likely that they just stick with the keyboard.
Again--I can't stress this enough--I think this is a terrible, horrible, no-good idea. Please don't use this approach. But you asked a technical question and this site is all about giving technical answers, so there you go...

Combobox show text properly

I have a combo box that when I open it should show text like
However I get something like
with the scrollbar set to middle. Thing is sometimes for the same values it shows properly
and sometimes it shows from middle(for same value).
I want it to show properly like in the first image and I've tried a couple of things but with no succes.
itemSection.setHoverAlign(Alignment.LEFT);
itemSection.setTextAlign(Alignment.LEFT);
itemSection.setAlign(Alignment.LEFT);
... and other irelevand stuff ...
Any help is highly appreciated. Thanks alot!
If I am not getting wrong, You want to set your scrollbar at particular position. FOr that you need to ovverride the css of that and try to set scrollbar position to 0. So that your problem will get solved.
The problem with any kind of selections box is, that the boxes display and behave completely different across browsers. The older the browser the worse it handles long texts in selection boxes (some just truncate the text). I suggest to keep the displayed text as short as possible. That way you can avoid this problem.
If you really need long description, you can try to add a tooltip to every entry. Or use a different widget to make the select from, e.g. some custom widget in a separate dialog...

Printing Crystal Report detail section to second page collated

I have a Crystal XI Release 2 report that my client wants to see on two pages. He wants the report to print the demographic information such as (name, address, etc...) for a person on the first page and the totals for the person need to print on the second page. The first page will include as many rows as will fit and the second page will have the same amount of rows which correspond one for one to the first page. Then the third page will contain a new page of people starting where the first ended.
He basically is looking for printing similar to how Excel prints (and please don't tell me to Export to Excel and print from there).
I came up with two ideas for doing this, but only got anywhere with one. The first was to run two reports (one for the demographic info and the other for the totals) which would be collated together somehow. I didn't get very far with this, but I didn't spend a ton of time researching this so I still think this could be an option.
The second way was to extend the report design to the width of two landscape pages, add my fields, and then change my page size back to a single landscape size before I get ready to print. This way sorta works, but can cause some weird issues. One is that if you try to edit/add a field on the second page when the report size is set to a single page landscape the fields are moved to the far right of the first page which makes sense because I would think that is supposed to be the editable region of the designer so I'd assume you're not supposed to have fields outside of this region.
All in all, the second way works, but I know there has to be a better way to do this. I wanted to see if anyone has had a similar request or have some other ideas on a better way to do this. Thanks
I can't think of an easy way to do this in Crystal.
You could get all hacky on the datasource and duplicate every 20(or however many fit on one page) rows. Then you would set up 2 details sections, one section for demographics and the other for totals. Then conditionally suppress them depending on remainder(pagenumber, 2).
Or you could use a subreport that accepts paging parameters and only returns 20 rows per page. But I'm not even sure if you can link a subreport parameter to the pagenumber special field.
How does your second way work? The extra fields just get printed on the next page somehow? However, the problem is that the fields stay outside the designer when you go back to one page and if you need to edit they all move back inside the designer? Couldn't you increase the page width before editing? That's not too bad if it somehow prints it out correctly every time.
I guess I will mark this as the answer since I still haven't been able to figure out a better way around it. If anyone finds a better way then post a response and if it works I think can toggle the answer.
What I do to get around this is to set my printer to the "Microsoft Office Document Image Writer" and then change the width to the widest it will allow which is 36". Then I put the demographic information from the beginning of the section to around 11" and put the totals stating just to the right of where the first section ended and go for another page width.
Then I make whatever changes that I need to make and set the printer back to the printer I want to use for the correct size. After you do this you will find that the editable area only extends to the first page, but you can see the second page of fields to the right. If you try to edit a field on the second page the field will move to the far right of the editable region which is at the far right of the first page so make sure you reset your printer before making edits.
I think I also had to play around with the width of the detail section on the layout tab of the section expert to get the report to print correctly. I set it to the combined size of the 2 pages for mine to look correct.
I think that this is probably a super rare issue, but if you are having a similar issue, that is how I get around it.