![]() |
ShowTabWorkSpace is NULL |
Post Reply ![]() |
Author | |
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() Posted: 07 February 2007 at 1:40pm |
Hi, friends.
I have a problem with this code in Visual Foxpro 9 SP1 workspace = CommandBars.ShowTabWorkspace(.t.) workspace.EnableGroups() When i execute this code, WorkSpace not is a object else is NULL, then i dont access to the properties and methods of TabWorkSpace. I need your help. Thank very much for all. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
CommandBars can't find MDI client in foxPro window.
Set it using SetMDIClient method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
Ok, but i need your help again,
![]() The main form the child form or forms Have i set it setclient only one time for the main form??? or for every child form?? And in adittion i have other problem with the child forms, the child form is over the toolbar and not respect this area. Example: ![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Actually we never tested it in FoxPro and never write that CommandBars support it. Attach this sample, I will debug it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
Thank very much for your help , here is the sample.
INIT METHOD (MAIN FORM) PUBLIC commandbars commandbars = thisform.commandBars thisform.createribbonbar() local StatusBar As XtremeCommandBars.StatusBar StatusBar = this.CommandBars.StatusBar StatusBar.Visible = .t. StatusBar.AddPane(0) oPane = StatusBar.AddPane(1) oPane.width = 70 oPane = StatusBar.AddPane(2) oPane.width = 50 StatusBar.AddPane(ID_INDICATOR_CAPS) StatusBar.AddPane(ID_INDICATOR_NUM) StatusBar.AddPane(ID_INDICATOR_SCRL) RibbonBar.EnableFrameTheme() CommandBars.Options.KeyboardCuesShow = 2 CommandBars.setmdIClient(thisform.hWnd) CommandBars.EnableCustomization(.t.) public Workspace As CommandBars.TabWorkspace tabworkspace = commandbars.showTabWorkspace(.t.) tabworkspace.EnableGroups() CREATERIBBONBAR METHOD PUBLIC RibbonBar As XtremeCommandBars.RibbonBar RibbonBar = CommandBars.AddRibbonBar("The Ribbon") RibbonBar.EnableDocking(1048576) RibbonBar.Minimized = .t. local ControlAbout As XtremeCommandBars.CommandBarControl ControlFile = RibbonBar.AddSystemButton() ControlFile.IconId = ID_SYSTEM_ICON ControlFile.CommandBar.Controls.Add(1, ID_FILE_NEW, "&New", .f., .f.) ControlFile.CommandBar.Controls.Add(1, ID_FILE_OPEN, "&Open...", .f., .f.) oControl = ControlFile.CommandBar.Controls.Add(1, ID_FILE_PRINT_SETUP, "Pr&int Setup...", .f., .f.) oControl.BeginGroup = .t. oControl = ControlFile.CommandBar.Controls.Add(1, ID_FILE_MRU_FILE1, "Recent File", .f., .f.) oControl.BeginGroup = .t. oControl.Enabled = .f. oControl = ControlFile.CommandBar.Controls.Add(1, ID_APP_EXIT, "E&xit", .f., .f.) oControl.BeginGroup = .t. ControlFile.CommandBar.SetIconSize(32, 32) ControlAbout = RibbonBar.Controls.Add(1, ID_APP_ABOUT, "&About", .f., .f.) ControlAbout.Flags =1 TabHome = RibbonBar.InsertTab(0, "&Home") TabHome.Id = ID_TAB_HOME GroupFile = TabHome.Groups.AddGroup("File", ID_GROUP_FILE) GroupFile.Add(1, ID_FILE_NEW, "&New", .f., .f.) GroupFile.Add(1, ID_FILE_OPEN, "&Open", .f., .f.) GroupFile.Add(1, ID_FILE_CLOSE, "&Close", .f., .f.) ControlSaveAs = GroupFile.Add(4, ID_FILE_SAVE, "&Save", .f., .f.) ControlSaveAs.CommandBar.Controls.Add(1, ID_FILE_SAVE, "&Save", .f., .f.) ControlSaveAs.CommandBar.Controls.Add(1, ID_FILE_SAVE_AS, "Save &As...", .f., .f.) ControlPrint = GroupFile.Add(4, ID_FILE_PRINT, "Print", .f., .f.) ControlPrint.CommandBar.Controls.Add(1, ID_FILE_PRINT, "&Print", .f., .f.) ControlPrint.CommandBar.Controls.Add(1, ID_FILE_PRINT_SETUP, "Print &Setup...", .f., .f.) ControlPrint.BeginGroup = .t. [....] And the rest code for menus. COMMANDBARS.EXECUTE METHOD LPARAMETERS control DO case Case control.id = 57648 thisform.LoadNewDoc() ENDCASE LOADNEWDOC METHOD DO FORM c:\frmdocument noshow CommandBars.EnableOffice2007FrameHandle( frmdocument.hwnd ) frmdocument.show() |
|
![]() |
|
mav50202 ![]() Newbie ![]() Joined: 09 August 2005 Status: Offline Points: 24 |
![]() ![]() ![]() ![]() ![]() |
At least, i did it, the only way is put the commanbar control in a toolbar of Visual Foxpro, with that way you will get that the windows is not over the commandbar.
Is important set the property setminimumwidth.
Thank you for all.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Glad you find it.
Sorry I didn't see you added post with code.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vicos ![]() Groupie ![]() Joined: 23 November 2009 Location: Romania Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
Share your example with community please...
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |