Page 1 of 1

Combobox in buttonbar doubt

Posted: Thu Oct 10, 2024 7:26 pm
by wartiaga
Hi,

I have this code:

REDEFINE BUTTONBAR oBar ID 100 OF oDlg 2007
DEFINE BUTTON OF oBar PROMPT "Gerar" FILE "B_SAVE" ACTION PreBol()
DEFINE BUTTON OF oBar PROMPT "Sair" FILE "B_EXIT" GROUP ACTION oDlg:End()

How I can put a combobox next of last button in this oBar?

I tried @x,y and DEFINE/REDEFINE, not work!

Thanks in advance.

Re: Combobox in buttonbar doubt

Posted: Fri Oct 11, 2024 4:53 am
by Antonio Linares
It seems as you are creating a dialog from resources. If so, then create it from:

ACTIVATE DIALOG oDlg ON INIT BuildYourCombobox( oDlg )

then

function BuildYourCombobox( oDlg )

@ ..., ... COMBOBOX ... OF oDlg:oBar

return .T. // to give focus to default first control

Re: Combobox in buttonbar doubt

Posted: Fri Oct 11, 2024 4:45 pm
by wartiaga
Antonio Linares wrote:It seems as you are creating a dialog from resources. If so, then create it from:

ACTIVATE DIALOG oDlg ON INIT BuildYourCombobox( oDlg )

then

function BuildYourCombobox( oDlg )

@ ..., ... COMBOBOX ... OF oDlg:oBar

return .T. // to give focus to default first control
Thank You Antonio!