Page 1 of 1

ButtonBar / Toolbar + Combobox ?

PostPosted: Sun Apr 09, 2023 6:04 am
by Jimmy
hi,

is it possible to add Combobox into ButtonBar / Toolbar under Fivewin :?:

if yes how :?:
Image

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Sun Apr 09, 2023 6:23 am
by nageswaragunupudi
Buttonbar is FWH's own control and we can, for sure, have other controls like combobox within buttonbar.

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Sun Apr 09, 2023 7:07 pm
by albeiroval
Mr. Rao

Is it possible to also add a GET control to BUTTONBAR ?
Can you give an example please.

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Tue Apr 11, 2023 5:18 pm
by nageswaragunupudi
albeiroval wrote:Mr. Rao

Is it possible to also add a GET control to BUTTONBAR ?
Can you give an example please.


Sample:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oWnd, oBar, oGet, oCbx
   local nVar  := 900
   local cVar  := "Three"

   SetGetColorFocus()

   DEFINE WINDOW oWnd
   DEFINE BUTTONBAR oBar OF oWnd SIZE 70,40 2010
   DEFINE BUTTON OF oBar PROMPT "One" CENTER
   DEFINE BUTTON OF oBar PROMPT "Two" CENTER

   @ 10,160 GET oGet VAR nVar PICTURE "999" SIZE 50,20 PIXEL RIGHT OF oBar ;
      VALID ( MsgInfo( nVar ), .t. )
   @ 10,240 COMBOBOX oCbx VAR cVar ITEMS { "One","Two","Three" } ;
      SIZE 90,200 PIXEL OF oBar

   DEFINE BUTTON OF oBar PROMPT "Exit"  CENTER GROUP BTNRIGHT ;
      ACTION oWnd:End()

   oWnd:nWidth := 700

   ACTIVATE WINDOW oWnd CENTERED

   ? nVar, cVar

return nil
 

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Tue Apr 11, 2023 7:32 pm
by Jimmy
GREAT
thx for Sample

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Wed Apr 12, 2023 2:01 pm
by albeiroval
Fine, thanks

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Wed Apr 12, 2023 7:45 pm
by Jimmy
hi,

i have a Problem when place "only" 1 x GET into ButtonBar

as it can not "change" to other Control it does not "lostFocus" -> no VALID -> no GOTO :(

any Idea for a Workaround :?:

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Thu Apr 13, 2023 1:26 am
by karinha
Example?

Regards.

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Thu Apr 13, 2023 2:01 am
by nageswaragunupudi
Jimmy wrote:hi,

i have a Problem when place "only" 1 x GET into ButtonBar

as it can not "change" to other Control it does not "lostFocus" -> no VALID -> no GOTO :(

any Idea for a Workaround :?:

Yes.
We need to have atleast 2 controls.

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Thu Apr 13, 2023 6:00 am
by Jimmy
hi,
nageswaragunupudi wrote:We need to have atleast 2 controls.

thx for Answer

i will include a 2nd Control

Re: ButtonBar / Toolbar + Combobox ?

PostPosted: Thu Apr 13, 2023 10:44 am
by nageswaragunupudi
In fact, it is the same situation when we have only one Get control on a dialog/window.