Ribbon drawing

Ribbon drawing

Postby Carlos Mora » Mon Nov 04, 2013 3:23 pm

Probably I'm doing something wrong, but I can't see where.
I'm building a MDI window with a Ribbon Bar, sth that looks easy, but the groups aren't painted right at program star. When the mice passes over it, the problem disapears:

Image with problem:
Image

after passing the mice over:

Image

Code:

Code: Select all  Expand view

 #INCLUDE 'Fivewin.ch'
 #INCLUDE 'Ribbon.ch'
 
 STATIC OWNDMAIN, oFont , oFuenteL, oFuenteM, oFuenteS, oWnd
 
Procedure Main()
   LOCAL oBrush , oBmpTit

   DEFINE FONT oFuenteL  NAME "Segoe UI Light"   SIZE 0, -30
   DEFINE FONT oFuenteM  NAME "Segoe UI Light"   SIZE 0, -17
   DEFINE FONT oFuenteS  NAME "Segoe UI Light"   SIZE 0, -14


  DEFINE WINDOW oWnd MDI BRUSH oBrush TITLE 'Prueba' STYLE nOr( WS_POPUP, WS_BORDER)

   oWnd:bInit     :={|| MainMenu(),oWnd:Refresh()}
   oWnd:oMenu:end()

   ACTIVATE WINDOW oWnd  maximized


RETURN

//----------------------------------------------------------------------------//
Function MainMenu()


   local  oRbnBar, oGr1,oTBtn1, oTBtn2,oTBtn3,oGr2,oGr3, oBtn
   local  oBackStage
   local option
   local oMtr,nAct
   local aDB := {}

   if oRbnBar !=nil
      oRbnBar:End()
      oRbnBar:=nil
   endif

   DEFINE RIBBONBAR oRbnBar WINDOW oWnd PROMPT "Principal" HEIGHT 127 TOPMARGIN 25 2013 //Apariencia del 2013
   oRbnBar:nLeftMargin = 4
   oRbnBar:CalcPos()

 
   ADD group oGr1 RIBBON oRbnBar to Option 1 PROMPT "Maestros" WIDTH 805

      @ 5,5   ADD BUTTON oBtn PROMPT "SubSec"    GROUP oGr1 BITMAP "subsec"    ROUND SIZE 75,75 ACTION Mantegen("MAESUBSEC",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)

      @ 5,85  ADD BUTTON oBtn PROMPT "CLegal"    GROUP oGr1 BITMAP "contra"    ROUND SIZE 75,75 ACTION Mantegen("MAECONLEG",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)

      @ 5,165 ADD BUTTON oBtn PROMPT "CInterno"  GROUP oGr1 BITMAP "contral"   ROUND SIZE 75,75 ACTION  Mantegen("MAECONINT",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)

      @ 5,245 ADD BUTTON oBtn PROMPT "Provincia" GROUP oGr1 BITMAP "provin"    ROUND SIZE 75,75 ACTION  Mantegen("MAEPROVIN",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)

      @ 5,325 ADD BUTTON oBtn PROMPT "Paises"    GROUP oGr1 BITMAP "paises"    ROUND SIZE 75,75 ACTION  Mantegen("MAEPAIS",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)

      @ 5,405 ADD BUTTON oBtn PROMPT "Poblacion" GROUP oGr1 BITMAP "poblacion" ROUND SIZE 75,75 ACTION  Mantegen("MAEPOBLAC",aDB,.T.,{},{})
      oBtn:SetFont(oFuenteS)
      oGr1:SetFont(oFuenteS)

   ADD group oGr2 RIBBON oRbnBar to Option 1 PROMPT "Internos" WIDTH 100

      @ 5,15   ADD BUTTON oBtn PROMPT "Datos Pers." GROUP oGr2 BITMAP "trabaja" ROUND SIZE 75,75 ACTION Mantegen ("DATPER",aDB,.F.,{},{})
      oGr2:SetFont(oFuenteS)
      oBtn:SetFont(oFuenteS)

   ADD group oGr3 RIBBON oRbnBar to Option 1 PROMPT "Externos" WIDTH 100

      @ 5,15   ADD BUTTON oBtn PROMPT "Datos Pers." GROUP oGr3 BITMAP "exter"   ROUND SIZE 75,75 ACTION Mantegen ("INFTRAEXT",aDB,.F.,{},{})
      oGr3:SetFont(oFuenteS)
      oBtn:SetFont(oFuenteS)

 return nil

Function Mantegen( cData )
RETURN MsgInfo(cData )

 


It has been compiled against the last FW release, downloaded today.
I have no idea what I'm doing wrong. ¿Any clue?

Regards
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: Ribbon drawing

Postby Lailton » Tue Nov 05, 2013 1:15 am

oWnd:oTop:=oRbnBar

maybe.
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 129
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: Ribbon drawing

Postby cnavarro » Tue Nov 05, 2013 1:39 am

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Ribbon drawing

Postby Carlos Mora » Tue Nov 05, 2013 8:56 am

Hi Lailton,

Lailton wrote:oWnd:oTop:=oRbnBar

tried, but nope, doesn't works.

Thanks anyway :)

Best regards
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: Ribbon drawing

Postby Antonio Linares » Tue Nov 05, 2013 1:57 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Ribbon drawing

Postby codemaker » Sun Nov 10, 2013 4:59 pm

Lailton wrote:oWnd:oTop:=oRbnBar

maybe.

Lailton,
I have no other way to contact you, because you are not answering to me for a few months by now. And I am sending the e-mails regularly almost every week. Your FiveWeb is in question.

This is why I have to ask you on public:
What should I do to get an answer from you - regarding what you promised to me several months before?
From then on - you even don't think it is worth answer to me.
I cannot understand, because this is not the way I am communicating with people.
This is totally unfair from you, having in mind that we are both on this forum and I can see you are "alive" so my conclusion can be only that you simply do not want to consider answering to me.
I deserve some answer - don't you think?
Thanks
Boris

(Antonio, I am really sorry for this off-topic, but I hate to be ignored by people I trusted after I spent my money on them, especially for no reason at all)
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 28 guests