twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

List - errors when using several control styles at once #59

Closed EpicNet closed 2 years ago

EpicNet commented 2 years ago

I am using "mIRC v7.67" + "DCX dll v3.1-git428" in system "Windows 8.1 x64".

If when creating a "List" control at the same time use styles dragline and draglist, it causes errors. Although the help documentation states that they can work together.

D_CERROR xdialog -c list_test: Unable To Create Control (Cannot apply draglist style with multi style) D_ERROR /xdialog ("list_test -c 1 list 30 30 240 200 dragline draglist" error: Cannot apply draglist style with multi style)


Here is a test piece of script to reproduce this the problem. To run the script click on "F5" or enter the command "/list_test":

alias F5 { list_test }
alias list_test {
  if ($dialog(list_test)) .dialog -x list_test
  else { .dialog -m list_test list_test }
}
dialog list_test {
  title "List test"
  icon $mircexe,0
  option pixels
  size -1 -1 300 255
}
on *:DIALOG:list_test:init:*:{
  .dcx Mark $dname list_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 list 30 30 240 200 dragline draglist 
  .xdid -x $dname 1 +b
  .xdid -C $dname 1 +b $rgb(40,40,47)
}
alias list_test_work {}
OokEek commented 2 years ago

Fixed. When draglist style was used an incorrect check for multi select was done.