Try calling IupRefresh after dynamic adding the controls.

Best,
Scuri


Em sex., 20 de set. de 2024 às 13:52, Graham Stephens <
gra...@thestephensdomain.com> escreveu:

>
> Sorry, I'm having trouble working out how to reply to these
> responses...? (I didn't get a message to my account?)
>
> A rough idea of the process I'm trying to use!!!
> Toggles in marketSelectionsHandle cause additions to selectedMarkets,
> which are then added when buildMarketPanel gets called.
>
> * Incomplete code! *
> * I can post the full listing if required *
>
> func main  {
>
>         tabsHandle =
> iup.Tabs().SetAttributes("TABTITLE0=\"1\",TABTITLE1=\"2\",MINSIZE=338x,
> MAXSIZE=338x")
>
>         marketValuesHandle = buildMarketPanel()
>         marketSelectionsHandle = buildSelectionPanel()
>
>         tabsHandle = iup.Append(tabsHandle, marketValuesHandle)
>         tabsHandle = iup.Append(tabsHandle, marketSelectionsHandle)
>
>         dlg := iup.Dialog(
>                 iup.Hbox(
>                         tabsHandle,
>                         iup.Hbox(
>                         ).SetAttributes("ALIGNMENT=ACENTER"),
>                 ),
>         ).SetAttributes("TITLE=\"Scrollbar test\", MARGIN=10x10")
> }
>
> func buildMarketPanel() iup.Ihandle {
>
>         gb := iup.GridBox().SetAttributes(map[string]string{
>                 "SIZECOL": "2",
>                 "SIZELIN": "1",
>                 "NUMDIV":  "4",
>                 "NORMALIZESIZE": "BOTH",
>                 "ORIENTATION": "HORIZONTAL",
>                 "ALIGNMENTCOL": "ACENTER",
>                 "MARGIN":       "10x10",
>                 "GAPLIN":       "20",
>                 "GAPCOL":       "10",
>         })
>
>         gb = fillMarketPanel(gb)
>         sb := iup.ScrollBox(gb)
>
>         return sb
> }
>
> func fillMarketPanel(gb iup.Ihandle) iup.Ihandle {
>
>         gb = iup.Append(gb,
> iup.Label("Market").SetAttributes("FONTSTYLE=Bold"))
>         gb = iup.Append(gb,
> iup.Label("Price").SetAttributes("FONTSTYLE=Bold"))
>         gb = iup.Append(gb, iup.Label("Bet
> Size").SetAttributes("FONTSTYLE=Bold"))
>         gb = iup.Append(gb,
> iup.Label("Back/Lay").SetAttributes("FONTSTYLE=Bold"))
>
>         var mCKeys []string
>
>         for key := range selectedMarkets {
>                 mCKeys = append(mCKeys, key)
>         }
>
>         slices.Sort(mCKeys)
>
>         for _, key := range mCKeys {
>                 gb = iup.Append(gb, iup.Label(key))
>                 gb = iup.Append(gb, iup.Text())
>                 gb = iup.Append(gb, iup.Text())
>                 gb = iup.Append(gb, iup.Toggle("  Lay"))
>         }
>
>         gb = iup.Append(gb, iup.Fill())
>         gb = iup.Append(gb, iup.Fill())
>         gb = iup.Append(gb, iup.Button("Clear"))
>         gb = iup.Append(gb, iup.Fill())
>
>         return gb
> }
>
>
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to