Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ShowTabWorkSpace is NULL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ShowTabWorkSpace is NULL

 Post Reply Post Reply
Author
Message
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post Topic: ShowTabWorkSpace is NULL
    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.


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2007 at 3:12pm
Hi,
CommandBars can't find MDI client in foxPro window.
Set it using SetMDIClient method.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2007 at 10:25am
Ok, but i need your help again,   i dont know what is the form wich set it in setclient method:
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:



Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2007 at 11:41am
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
Back to Top
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2007 at 12:25pm
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()
Back to Top
mav50202 View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote mav50202 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2007 at 5:19am
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2007 at 7:56am
Hi,
 
Glad you find it.
Sorry I didn't see you added post with code.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vicos View Drop Down
Groupie
Groupie


Joined: 23 November 2009
Location: Romania
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicos Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2013 at 2:48pm
Share your example with community please...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.154 seconds.