Ribbonbar Title problem

This forum is for support of XCodeJock
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4547
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Ribbonbar Title problem

#1 Post by rdonnay »

I have had several requests to remove the title bar when using the RibbonBar.

Chris Andries helped with this and found the enableFrameTheme() method of the RibbonBar object.

This, and some other code changes provides nearly the desired affect, but the RibbonBar then occupies too much of the drawing area.

See the following video:

http://bb.donnay-software.com:8080/supp ... lbar2.html

Any ideas are welcome.

Code is attached.
Attachments
tabbedtoolbar.zip
Tabbed Toolbar title problem
(33.53 KiB) Downloaded 736 times
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1336
Joined: Wed Feb 24, 2010 3:44 pm

Re: Ribbonbar Title problem

#2 Post by Auge_Ohr »

rdonnay wrote:I have had several requests to remove the title bar when using the RibbonBar.
Chris Andries helped with this and found the enableFrameTheme() method of the RibbonBar object.
search in Sample for iTunes ... that is that Style ;)

i say your Video and that Browse Position/Size is wrong ... we did had that Problem before ... hm ...
here my Code

Code: Select all

*  aSize := AppDesktop():currentsize()
   aSize[1] := aSize[1]/10*9
   aSize[2] := aSize[2]/10*9
   aPos  := CenterPos( aSize ,AppDesktop():currentsize())

   oDlg:minButton := .T.
   oDlg:maxButton := .T.

   oDlg:setDisplayFocus := {| uNIL1, uNIL2, oSelf | XSet2Browse(oDlg) }
   oDlg:setinputfocus   := {| uNIL1, uNIL2, oSelf | YSet2Browse(oDlg) }
   oDlg:configure()

   oDlg:setposandsize(aPos,aSize)
*  oDlg:setFrameState( XBPDLG_FRAMESTAT_MAXIMIZED )

   //
   // CJ Menu Ribbonbar and Statusbar
   //
#IFDEF CJBARS
   oDlg:PathIco   := ZPATH+"ICON"
   oDlg:InitImgList()
   oDlg:InitMenuBar()
   oDlg:oCbarS:ActiveMenuBar:Visible := .T.
#ENDIF

#IFDEF CJBARS
   //
   // Event from Ribbonbar
   //
   RibbonBlock(oDlg)
#ENDIF

   //
   // Static on :drawingArea using Threads
   //
   oDlg:InitTabArea()
   oControl := oDlg:InitTabShort()

#IFDEF CJSKIN
   oDlg:oSkin:callMethod("ApplyWindow", oDlg:oCbarS:getHWND() )
   oDlg:oSkin:callMethod("ApplyWindow", oDlg:oRibbonbar:hWnd )
#ENDIF
what i do not understand is why you use extra "Tab" under Commandbar.
You can use RibbonTabgroup to get that "Effect"
:enableFrameTheme() and RibbonTabgroup
:enableFrameTheme() and RibbonTabgroup
Cal_Entry.JPG (123.03 KiB) Viewed 11667 times
btw using ::oRibbonBar:AllowMinimize := .T. and ::oRibbonBar:Minimized := .T. you can get "more" Space and use Ribbenbar as "dropdown Menue"
greetings by OHR
Jimmy

skiman
Posts: 1038
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Ribbonbar Title problem

#3 Post by skiman »

Hi Jimmy,

I think the trick is in the following functions?

Code: Select all

   oDlg:InitTabArea()
   oControl := oDlg:InitTabShort()
I suppose your initTabArea method is defining the height of the workarea.
Best regards,

Chris.
www.aboservice.be

User avatar
Auge_Ohr
Posts: 1336
Joined: Wed Feb 24, 2010 3:44 pm

Re: Ribbonbar Title problem

#4 Post by Auge_Ohr »

skiman wrote: I think the trick is in the following functions?

Code: Select all

   oDlg:InitTabArea()
   oControl := oDlg:InitTabShort()
I suppose your initTabArea method is defining the height of the workarea.
as i say i "attach" a Static to RibbonTabGroup.

Code: Select all

METHOD VOBWORK:InitTabArea()
LOCAL oDraw := ::drawingArea
LOCAL aSize := ::drawingArea:currentsize()
LOCAL aPos  := {SC_LEFT,0}

   aSize[1] := aSize[1]-SC_LEFT+SC_ADD                      // PbStack Leiste
   aSize[2] := aSize[2]+SC_ADD

   ::aTabPage[ID_CALENDAR ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_ERFASSUNG,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_ARBEIT   ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_FAKTURA  ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_KUNDEN   ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_IMOBILIE ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_ARTIKEL  ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_UMSATZ   ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()
   ::aTabPage[ID_TOOLS    ,IS_RIBSTAT] := XbpStatic():new( oDraw,, aPos,aSize,,.F. ):create()

   ::aTabPage[ID_CALENDAR ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 229, 242, 255 } ))
   ::aTabPage[ID_ERFASSUNG,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 204, 229, 254 } ))
   ::aTabPage[ID_ARBEIT   ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 153, 203, 255 } ))
   ::aTabPage[ID_FAKTURA  ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 101, 177, 255 } ))
   ::aTabPage[ID_KUNDEN   ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 050, 151, 255 } ))
   ::aTabPage[ID_IMOBILIE ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 050, 151, 255 } ))
   ::aTabPage[ID_ARTIKEL  ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 000, 125, 255 } ))
   ::aTabPage[ID_UMSATZ   ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 000, 100, 204 } ))
   ::aTabPage[ID_TOOLS    ,IS_RIBSTAT]:setColorBG(GraMakeRGBColor( { 255, 242, 229 } ))

   ::aTabPage[ID_CALENDAR ,IS_RIBSTAT]:setCaption("CALENDAR ")
   ::aTabPage[ID_ERFASSUNG,IS_RIBSTAT]:setCaption("ERFASSUNG")
   ::aTabPage[ID_ARBEIT   ,IS_RIBSTAT]:setCaption("ARBEIT   ")
   ::aTabPage[ID_FAKTURA  ,IS_RIBSTAT]:setCaption("FAKTURA  ")
   ::aTabPage[ID_KUNDEN   ,IS_RIBSTAT]:setCaption("KUNDEN   ")
   ::aTabPage[ID_IMOBILIE ,IS_RIBSTAT]:setCaption("IMOBILIE ")
   ::aTabPage[ID_ARTIKEL  ,IS_RIBSTAT]:setCaption("ARTIKEL  ")
   ::aTabPage[ID_UMSATZ   ,IS_RIBSTAT]:setCaption("UMSATZ   ")
   ::aTabPage[ID_TOOLS    ,IS_RIBSTAT]:setCaption("TOOLS    ")

   ::aTabPage[ID_CALENDAR ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_CALENDAR )}
   ::aTabPage[ID_ERFASSUNG,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_ERFASSUNG)}
   ::aTabPage[ID_ARBEIT   ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_ARBEIT   )}
   ::aTabPage[ID_FAKTURA  ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_FAKTURA  )}
   ::aTabPage[ID_KUNDEN   ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_KUNDEN   )}
   ::aTabPage[ID_IMOBILIE ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_IMOBILIE )}
   ::aTabPage[ID_ARTIKEL  ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_ARTIKEL  )}
   ::aTabPage[ID_UMSATZ   ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_UMSATZ   )}
   ::aTabPage[ID_TOOLS    ,IS_RIBSTAT]:resize := {|mp1,mp2,oSelf| ::TabResize(mp1,mp2,oSelf,ID_TOOLS    )}

RETURN self
and here is the :resize

Code: Select all

METHOD VOBWORK:TabResize(aOldSize,aNewSize,oSelf,nIDNr)
LOCAL iMax, aChild
LOCAL aSize   := aNewSize

   IF aOldSize[1] == 0 .AND. aOldSize[2] == 0
      aOldSize := aNewSize
      RETURN self

   ELSEIF aNewSize[1] == 0 .OR. aNewSize[2] == 0
      RETURN self

   // add "same Size", nothing had happend
   ELSEIF aNewSize[1] == aOldSize[1] .AND. aNewSize[2] == aOldSize[2]
      RETURN self
   ENDIF

*   oSelf:hide()
*   oSelf:LockUpdate(.T.)
   oSelf:setPosAndSize({SC_LEFT,0},aNewSize)

   aChild := oSelf:childList()
   iMax   := LEN(aChild)
   IF iMax > 0
      DO CASE
         CASE nIDNr == ID_CALENDAR   ; ::Tab_CALENDAR (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_ERFASSUNG  ; ::Tab_ERFASSUNG(aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_ARBEIT     ; ::Tab_ARBEIT   (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_FAKTURA    ; ::Tab_FAKTURA  (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_KUNDEN     ; ::Tab_KUNDEN   (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_IMOBILIE   ; ::Tab_IMOBILIE (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_ARTIKEL    ; ::Tab_ARTIKEL  (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_UMSATZ     ; ::Tab_UMSATZ   (aOldSize,aNewSize,oSelf)
         CASE nIDNr == ID_TOOLS      ; ::Tab_TOOLS    (aOldSize,aNewSize,oSelf)
      ENDCASE
   ENDIF
*   oSelf:LockUpdate(.F.)
*   oSelf:show()
RETURN self
i "think" the "Problem" is that only Xbase++ have a :DrawingArea. In harbour you have to use a Static to "simulate" it.
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4547
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Ribbonbar Title problem

#5 Post by rdonnay »

i "think" the "Problem" is that only Xbase++ have a :DrawingArea. In harbour you have to use a Static to "simulate" it.
eXpress++ and XCodeJock are products for Xbase++, not harbour.

I am trying to get a simple answer.
All of the code you posted is impossible to understand because it isn't something that can be compiled and run.
It is a lot of pieces that don't connect together in any kind of understandable form.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1336
Joined: Wed Feb 24, 2010 3:44 pm

Re: Ribbonbar Title problem

#6 Post by Auge_Ohr »

rdonnay wrote:
i "think" the "Problem" is that only Xbase++ have a :DrawingArea. In harbour you have to use a Static to "simulate" it.
eXpress++ and XCodeJock are products for Xbase++, not harbour.
i knew this and it was only to show Difference from Xbase++ to "other" Windows Compiler.

as you can use Codejock for other Compiler/System i "testdrive" WinDev. Like harbour it does not have a :drawingArea and so it have no Problem with Position / Titelbar
rdonnay wrote:
I am trying to get a simple answer.
the Answer is :DrawingArea ! Codejock does not know it !
rdonnay wrote:
All of the code you posted is impossible to understand because it isn't something that can be compiled and run.
It is a lot of pieces that don't connect together in any kind of understandable form.
as you know i do not have Express++ so i can not make a Demo for it.

I have no Problem with Ribbonbar any more and i just want to show some "pure" Xbase++ Source Code where i use CJ Methode and Property which might miss in XCodejock.
i do not remember (now) which Methode/Property was the "missing", but when you read my Source you will find them and you can read in Codejock Help File about it.
greetings by OHR
Jimmy

Post Reply