Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI related

Status
Not open for further replies.

pbworld30

Programmer
Mar 22, 2007
17
US
I have this regular MDI application. Like any MDI app, when I open sheets through MDI window, they are added as menu items and I can nevigate from one sheet to another sheet using menu. Is there any alternate method to do the same thing without using menu?

Thanks,
 
hi,
you can build a statusbar at the bottom of the Frame LIKE Windows OS,when you open a sheet,register the window in the status bar,when the window is registered,"create" and show a button in the statusbar datawindow,and in the datawindow's buttonclicked event ,get current clicked window's classname,and try to open.
 
Thanks... Sounds like a graat idea. Can you give some more
detail? Also please note that in my applicaton froma main window, I am opening the same window (sheet) with datawindow results again and again so I am wondering if classname still works because classname will return the same name. Any thoughts?
 
hi,
you are right,if opening the same sheet,the classname() returns same,i suggest you declaring an instance Variables to Flag diffent instance Sheet And Show in the Title,then you can nevigate one to another using the Window's Title,you can refer to the Sybase PowerBuilder Code Examples (w_mdi_first_next_sheet)

sorry ,i have some idea about this ,but because of my poor English,it's Difficult to Show More Detail.
 
Thanks, Your suggestion to look into code example was very good. I can get the list of opened sheets in array but I am not sure how to navigate from one to another since these window sheets are already open? Anu idea? By the way don't worry about English, you have usuful suggestions and that is really importnt. Thanks again,
 
thanks
if a sheet is opened ,you can use window.bringtotop = true to active the sheet.
find the function mf_open_sheet(string name) in the object m_mdi_first_next,i added some test script:
Code:
w_mdi_first_next_sheet w_instance
window list[]
integer cnt,i
string temp

if mf_is_open(name) then // if it is already open then list the open sheets
	cnt = mf_list_sheets(list)
	for i = 1 to cnt
		temp = temp + list[i].title + '~r~n'
          [COLOR=#ff0000]
          IF name = list[i].Title THEN//Founded
            list[i].BringtoTop = TRUE
          END IF
          [/color]
	next
	//messagebox('Warning',name +' is already open. The list of open sheets is below.~r~n~r~n'+temp,exclamation!)
else
	opensheetwithparm(w_instance,name,parentwindow,0,original!)
end if
 
Thanks, It works!!! Now I just need to find a way (may be datawindow or ddlb) to drop this list on a main sheet window so that the list shows up on each opened sheet (inharited from main sheet). Right?

Thanks again for all your suggestions / help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top