Results 1 to 1 of 1

Thread: CJToolBar hides my CJMenuBar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2018
    Posts
    1

    Default CJToolBar hides my CJMenuBar

    I added a cCJmenu Bar in place of the old DF style menu since i had already redone the tool bar. When it previews at first it would show both tool bar and menu bar. However when i run the application it hides the menu behind the toolbar. Oddly i found that if i strike some of the code for an object that i have, and run the application it does not hide the menu. Then if i unstrike the object and allow it to run again all works as normal. Why would an object cause this issue I am fairly new to all of this, but i do not understand. The code that has anything to do with the object and its procedure is below. This is what i take out and replace in order to display the menu and tool bar correctly. However, launching this application on several PC's makes it somewhat troublesome to fix.
    Code:
    Define idImage_Off for 100
    Define idImage_On for 101
    
    
    //This is inside the procedure OnCreateCommandBars
        Get AddImage "AutoCopy.ico" idImage_Off xtpImageNormal to iID 
        Get AddImage "AutoCopyHot.ico" idImage_Off xtpImageHot to iID     
        
        Get AddImage "Autocopy_On.ico" idImage_On xtpImageNormal to iID
        Get AddImage "AutoCopyHot_On.ico" idImage_On xtpImageHot to iID
    
    
    
     Object oAutocopytool is a cCJToolbar 
                    Set pbCloseable to False
                    Set pbCustomizable to False
                    Set pbShowExpandButton to False
                    Object oAutoCopyitems is a cCJMenuItem
                       Set peControlStyle to xtpButtonIconandCaption
                       Set psCaption to " Auto Copy Off"
                       Set psTooltip to ' Auto Copy Agreement Number To The Clipboard'
                       Set psImage to "AutoCopy.ico"
                       Set psImageHot to "AutoCopyHOT.ico"
                       
                        
                        Procedure onexecute Variant vCommandBarControl
                            If (gAutoCopy = 0) Begin
                              Move 1 to gAutoCopy
                              Set pscaption to " Auto Copy On"
                              Set piIconId to idImage_On 
                              Procedure_Return
                            End
                            If (gAutoCopy = 1) Begin
                                Move 0 to gAutoCopy
                                Set pscaption to " Auto Copy Off"
                                Set piIconId to idImage_Off
                                Procedure_Return
                            End
                         End_Procedure
                    End_Object 
                End_Object




    Thanks for any advice. -Kyle
    Last edited by Kyle; 16-Jul-2018 at 10:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •