Ribbonbar doubt

Ribbonbar doubt

Postby wartiaga » Fri Jun 21, 2024 12:14 pm

Hi,

How can I size the width and height of a ribbonbar tabs? Is it possible to increase the group prompt height as well? How? Thanks.

Image
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Ribbonbar doubt

Postby Marc Venken » Fri Jun 21, 2024 2:13 pm

Code: Select all  Expand view  RUN

   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Databases", "Leveranciers", "Ingeven Documenten","Software";
      HEIGHT 130 TOPMARGIN 25

   ADD GROUP oGr1  RIBBON oRBar TO OPTION 1 PROMPT "Databases" width 130 ;
      BITMAP "bitmaps\maveco.ico"

   @ 02, 05 ADD BUTTON oBtn1_1 GROUP oGr1 BITMAP "bitmaps\cut16.BMP" ;
      SIZE 120, 20 PROMPT "Klanten"  MOSTLEFT round ;
      action ( Folder_klanten(oWnd) )

   @ 24, 05 ADD BUTTON oBtn1_2 GROUP oGr1 BITMAP "bitmaps\copy16.BMP" ;
      SIZE 120, 20 PROMPT "Leveranciers"  MOSTLEFT round;
      action ( Folder_Leveranciers(oWnd) )

   @ 46, 05 ADD BUTTON oBtn1_3 GROUP oGr1 BITMAP "bitmaps\paste16.BMP" ;
      SIZE 120, 20 PROMPT "Artikels"  MOSTLEFT round;
      action ( Folder_artikels(oWnd) )

//  Documents =============================

   ADD GROUP oGr2  RIBBON oRBar TO OPTION 1 PROMPT "Documents" width 130 ;
      BITMAP "bitmaps\fivetech.BMP"

   @ 02, 05 ADD BUTTON oBtn2_1 GROUP oGr2 BITMAP "bitmaps\cut16.BMP" ;
      SIZE 120, 20 PROMPT "Orders"  MOSTLEFT round ;
      action ( Folder_Orders(oWnd) )

 
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1439
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ribbonbar doubt

Postby wartiaga » Fri Jun 21, 2024 2:46 pm

Marc Venken wrote:
Code: Select all  Expand view  RUN

   DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Databases", "Leveranciers", "Ingeven Documenten","Software";
      HEIGHT 130 TOPMARGIN 25

   ADD GROUP oGr1  RIBBON oRBar TO OPTION 1 PROMPT "Databases" width 130 ;
      BITMAP "bitmaps\maveco.ico"

   @ 02, 05 ADD BUTTON oBtn1_1 GROUP oGr1 BITMAP "bitmaps\cut16.BMP" ;
      SIZE 120, 20 PROMPT "Klanten"  MOSTLEFT round ;
      action ( Folder_klanten(oWnd) )

   @ 24, 05 ADD BUTTON oBtn1_2 GROUP oGr1 BITMAP "bitmaps\copy16.BMP" ;
      SIZE 120, 20 PROMPT "Leveranciers"  MOSTLEFT round;
      action ( Folder_Leveranciers(oWnd) )

   @ 46, 05 ADD BUTTON oBtn1_3 GROUP oGr1 BITMAP "bitmaps\paste16.BMP" ;
      SIZE 120, 20 PROMPT "Artikels"  MOSTLEFT round;
      action ( Folder_artikels(oWnd) )

//  Documents =============================

   ADD GROUP oGr2  RIBBON oRBar TO OPTION 1 PROMPT "Documents" width 130 ;
      BITMAP "bitmaps\fivetech.BMP"

   @ 02, 05 ADD BUTTON oBtn2_1 GROUP oGr2 BITMAP "bitmaps\cut16.BMP" ;
      SIZE 120, 20 PROMPT "Orders"  MOSTLEFT round ;
      action ( Folder_Orders(oWnd) )

 


Thank you for the answer, the problem is:

oRBar:SetFont( TFont():New( cFont, 0, - ( nFontSize - 3 ) ) )
oRBar:nHeightFld := 25

After changing the font size of the tabs, their size does not increase by itself, how can I force the increase? Thanks in advance.
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Ribbonbar doubt

Postby Marc Venken » Fri Jun 21, 2024 2:56 pm

I suppose you tried :

oBar:Refresh()

or

oBar:Adjust()

Just my idea's .... Mayby someone else has the sollution.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1439
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ribbonbar doubt

Postby wartiaga » Fri Jun 21, 2024 3:02 pm

Marc Venken wrote:I suppose you tried :

oBar:Refresh()

or

oBar:Adjust()

Just my idea's .... Mayby someone else has the sollution.


oBar:Adjust() does not exist and oBar:Refresh() does not work.

Thanks.
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Ribbonbar doubt

Postby wartiaga » Fri Jun 21, 2024 3:15 pm

I found the solution:

oRbar:CalcPos()
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: Ribbonbar doubt

Postby Marc Venken » Fri Jun 21, 2024 3:18 pm

Great,

From this topic ?

Code: Select all  Expand view  RUN
https://forums.fivetechsupport.com/viewtopic.php?f=3&t=36145&start=0&sid=8fc1815c7d7a316892c7425be53fbf34
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1439
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Ribbonbar doubt

Postby wartiaga » Fri Jun 21, 2024 3:32 pm

Marc Venken wrote:Great,

From this topic ?

Code: Select all  Expand view  RUN
https://forums.fivetechsupport.com/viewtopic.php?f=3&t=36145&start=0&sid=8fc1815c7d7a316892c7425be53fbf34


Yes!

Thank you!
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests