Page 1 of 1

POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 8:04 pm
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 ?

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 8:37 pm
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

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 8:56 pm
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

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 9:06 pm
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()

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 9:15 pm
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

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Sun Apr 30, 2017 10:00 pm
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

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Mon May 01, 2017 9:59 am
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

Re: POSITION BUTTONS ON BUTTONBAR

Posted: Mon May 01, 2017 10:05 am
by Silvio.Falconi
thanks