on 05-03-2016 4:21 PM
I want to force a MDI sheet window to come to the front and become the active sheet. I have tried to use SetFocus and BringToTop but they don't work.
I have a toolbar with First/Next/Prior/Last buttons and I want to be able to skip through the many sheet windows using the buttons.
Here is the First button code:
lw_sheet = gw_frame.GetFirstSheet()
If IsValid(lw_sheet) Then
???
End If
Hi Roland,
so BringToTop=TRUE does not work?
MDI related - Sybase: PowerBuilder - Tek-Tips
Outch..
GetFiirstSheet () :
Obtains the top sheet in the MDI frame, which may or may not be active.
So this code brings the mdi sheet window behind the current first sheet to top.
window lw_sheet
lw_sheet = gw_frame.GetFirstSheet()
If IsValid(lw_sheet) Then
lw_sheet = gw_frame.GetNextSheet ( lw_sheet )
If IsValid(lw_sheet) Then
lw_sheet.BringToTop = True
end if
End If
hth
Arnd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep ... a MS standard since Windows 3.1.
That is going to make it hard though in your tabbed pane design if someone uses the keyboard standards as tabbing through tab pages is also supported with this keyboard short-cut. So the next thing will be if a user uses the Ctrl+Tab are they changing panes (tab pages) or MDI_Child (sheet) windows?
Food for thought.
Roland,
lw_Sheet.BringToTop = True should work. Did you check to see if first sheet is indeed the sheet you would expect? Was the sheet window opened using OpenSheet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is interesting. Even I was under the impression that the stack would would be in the order in which the sheets were opened and GetFirstSheet would give the first sheet on the stack. But we are wrong. PB help says that GetFirstSheet will return the sheet on the top (which may or may not be the current sheet) and GetNextSheet will get the sheet after whatever sheet you specify.
In your case you need to somehow push the previously active sheet to the bottom of the stack.
If you are using PFC, then iterate thru the sheetmanager.inv_sheet array.
OpenSheet again on the sheet you want active - I think should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.