mIRC Homepage

adding to combo box

Posted By: jizzy

adding to combo box - 09/05/06 06:28 AM

Is it possible to add some text to the edit part of a combobox without adding it to the list?
Posted By: genius_at_work

Re: adding to combo box - 09/05/06 02:07 PM

Quote:
You can access the edit control in a combobox by using 0 as the N value.


/help /did

I don't know if that adds the data to the edit box or not.

-genius_at_work
Posted By: Abstract

Re: adding to combo box - 09/05/06 02:47 PM

Quote:
You can access the edit control in a combobox by using 0 as the N value.


Have you tried something like that?

Code:
/did -a $dname id 0 Blablabla
Posted By: jizzy

Re: adding to combo box - 10/05/06 01:45 AM

That only work with $did.
//echo $did($dname,$did,0)
Posted By: MikeChat

Re: adding to combo box - 10/05/06 03:57 AM

I think it makes a difference if you use -i or -a or whatever
try this
Code:
alias combo dialog -m combo combo
dialog combo {
  title "Combo Box Test"
  size -1 -1 150 100
  option dbu
  combo 100, 10 10 130 50
  edit "", 200, 10 60 130 10
  button "Insert", 900, 50 75 50 10
}
on *:dialog:combo:init:0:{ did -f combo 200 }
on *:dialog:combo:sclick:900:{ did -ri combo 100 0 $did(combo,200) }
Posted By: jizzy

Re: adding to combo box - 10/05/06 08:24 AM

I was actally talking about a combo box with the edit flag

combo 2, 10 15 110 10, edit, drop
Posted By: Abstract

Re: adding to combo box - 10/05/06 10:04 AM

Don't know where is the problem? I've just tried the line of code I wrote you before, and it works. I don't mean the $did identifier, but command /did.
Posted By: MikeChat

Re: adding to combo box - 10/05/06 02:40 PM

Quote:
I was actally talking about a combo box with the edit flag
combo 2, 10 15 110 10, edit, drop


change it to -k
test
Code:
alias combo dialog -dm combo combo
dialog combo {
  title "Combo Box Test"
  size -1 -1 150 100
  option dbu
  combo 2, 10 10 130 50, edit drop
  edit "Type Here", 200, 10 60 130 10, center
  button "CLICK", 900, 50 75 50 10
}
on *:dialog:combo:init:0:{
  var %i = 1
  while (%i <= 4) { 
    did -a combo 2 $r(a,z)
    inc %i
  }
  did -f combo 200
}
on *:dialog:combo:sclick:900:{ did -ik combo 2 0 $did(combo,200) }
Posted By: jizzy

Re: adding to combo box - 11/05/06 08:43 AM

Cheers, but I found an easier way. Just thought I could shorten my code.
Code:
did -c $dname id $findtok($didtok($dname,id,44),selection-name-here,1,44)
© 2021 mIRC Discussion Forums