0
/set %something sadf

hmm, can I use combo dialog boxes to set a value to variable?

If yes, how?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sasuke Kun
  • 2,449
  • 3
  • 15
  • 14

1 Answers1

1

If you want to set the value of a variable to be equal to whatever is in a combo box, you just need to add an on dialog event. Here's an example of how to do that

dialog combo {

  size -1 -1 100 20
  title "Combo"
  option dbu

  combo 1, 5 5 50 10
  button "Set variable", 2, 60 5 35 10

}

on 1:dialog:combo:sclick:2 { 

  if ($did(combo, 1) != $null) set %something $did(combo, 1)

}

alias combo dialog -m combo combo

Run /combo, type something in the combo box and press Set variable. The %something variable will be set with what you typed in.

M. A.
  • 415
  • 3
  • 12