POSITION BUTTONS ON BUTTONBAR

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

POSITION BUTTONS ON BUTTONBAR

Post by Silvio.Falconi »

iI wish a buttonbar on botton in a dialog
but I wish show some buttons at left and others at right as this

Image


Any solution please ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
stefano
Posts: 80
Joined: Tue Mar 25, 2008 9:03 pm
Location: ITALIA

Re: POSITION BUTTONS ON BUTTONBAR

Post by stefano »

Prova ad inserire

DEFINE BUTTON oBut1x OF oBar PROMPT " " FONT oFontb GROUP
oBut1x:disable()
oBut1x:nWidth = (ODLGB:nWidth-250) // lunghezza Button

saluti
Stefano
FWH 14.11 + xHarbour + bcc582
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: POSITION BUTTONS ON BUTTONBAR

Post by Silvio.Falconi »

??????

perhaps you not understood whatI wish

I Know How make a bottom buttobar on dliag and I know how insert Buttons on Buttonbar

But you can insert buttons from left to right

you cannot insert 6 buutons at left and then jump to the end of buttonbar and insert 3 buttons ....

I wish insert a new data on buttonbar called "lStop" it this value is .t.

the next buttons will be aligned to the other side of the buttonbar.

I hope you understood now
Last edited by Silvio.Falconi on Sun Apr 30, 2017 9:13 pm, edited 1 time in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
stefano
Posts: 80
Joined: Tue Mar 25, 2008 9:03 pm
Location: ITALIA

Re: POSITION BUTTONS ON BUTTONBAR

Post by stefano »

Il Pulsante "Invio" a destra del Dialog oDlgb

DEFINE BUTTONBAR oBar1 OF oDlgb 2013 SIZE 95,45 BOTTOM

DEFINE BUTTON oBut1x OF oBar1 PROMPT " " FONT oFontb GROUP
oBut1x:disable()
oBut1x:nWidth = (ODLGB:nWidth-250)

DEFINE BUTTON oBut OF oBar1 PROMPT "Invio" FONT oFontb FILE cperete+"\bmp\salir.BMP" left;
ACTION oDlgb:end() GROUP
obut:setcolor(colorsay,)

DEFINE BUTTON oBut1x OF oBar1 PROMPT " " FONT oFontb GROUP
oBut1x:disable()
FWH 14.11 + xHarbour + bcc582
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: POSITION BUTTONS ON BUTTONBAR

Post by Silvio.Falconi »

Stefano
leggi cosa t i ho scritto sopra
io vorrei 6 bottoni a destra e gli altri 3 a sinistra
tra i primi 6 e gli ultimi 3 non ci devono essere altri bottoni
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: POSITION BUTTONS ON BUTTONBAR

Post by Silvio.Falconi »

TEST.PRG

Code: Select all

#include "fivewin.ch"
#include "constant.ch"

Function test()
   Local nBottom   := 33
   Local nRight    := 115
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H
   Local oBar,oDlg
   Local oBut[10]

DEFINE DIALOG oDlg  ;   //OF oParent
   TITLE "test"    ;
   SIZE nWidth, nHeight TRANSPARENT PIXEL

oDlg:nStyle    := nOr( WS_OVERLAPPED,WS_THICKFRAME,WS_MAXIMIZEBOX,   0  )

DEFINE BUTTONBAR oBar OF oDlg 2015 SIZE 92,14 BOTTOM

 // this buttons are created from left to right
DEFINE BUTTON oBut[1] OF oBar PROMPT "Stampa"        LEFT FILENAME   ".\BITMAPS\STAMPA.BMP"
DEFINE BUTTON oBut[2] OF oBar PROMPT "Etichette"     LEFT FILENAME   ".\BITMAPS\ETI.BMP"
DEFINE BUTTON oBut[3] OF oBar PROMPT "Allegati"      LEFT FILENAME   ".\BITMAPS\ALLEGA.BMP"
DEFINE BUTTON oBut[4] OF oBar PROMPT "Rit.Acconto"   LEFT FILENAME  ".\BITMAPS\RIT.BMP"
DEFINE BUTTON oBut[5] OF oBar PROMPT "Includi doc. " LEFT FILENAME ".\BITMAPS\GENERA.BMP" GROUP

oBut[5]:DISABLE()

DEFINE BUTTON oBut[6] OF oBar PROMPT "Genera doc "   LEFT FILENAME ".\BITMAPS\GENERA.BMP"


                // this buttons are created from right to left
                DEFINE BUTTON oBut[7] OF oBar    LEFT FILENAME ".\BITMAPS\CALC.BMP" action Msgcalc()
                DEFINE BUTTON oBut[8] OF oBar    LEFT FILENAME ".\BITMAPS\AIUTO.BMP"
                DEFINE BUTTON oBut[9] OF oBar PROMPT "Chiudi "    LEFT FILENAME ".\BITMAPS\Chiudi.BMP" action oDlg:end()




ACTIVATE DIALOG oDlg CENTERED
return nil 
 


First problem
Image
the last 3 buttons must be at right

Second Problem
Image

i wish this button smaller instead of the size of the other butons(92,14)

third problem
why the button oBut[5] is not disabled ?

Fourth problem
How I can to erase the 3d effect from buttonbar ? I mean the line on the top
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: POSITION BUTTONS ON BUTTONBAR

Post by nageswaragunupudi »

FWH 17.04 provides positioning of some buttons right aligned on the buttonbar.
But we can not have different sizes of buttons.

Another way is to define BTNBMP of the bar using @ r,c, BTNBMP .... OF oBar
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: POSITION BUTTONS ON BUTTONBAR

Post by Silvio.Falconi »

thanks
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply