OptionList SetButtonEnabled not refreshing correctly.

Started by BazzaCAD, January 29, 2013, 03:30:03 PM

Previous topic - Next topic

BazzaCAD

When I do this:
Code (autolisp) Select

(defun c:dclBolts_optViewNut_OnClicked (nValue /)
  (dcl_Control_SetVisible TMaBolts_dclBolts_OptionList1 T)
  (dcl_OptionList_SetButtonEnabled TMaBolts_dclBolts_OptionList1 3 nil)
  (dcl_OptionList_SetButtonEnabled TMaBolts_dclBolts_OptionList1 4 nil)
)

(defun c:dclBolts_optViewHead_OnClicked (nValue /)
  (dcl_Control_SetVisible TMaBolts_dclBolts_OptionList1 T)
  (dcl_OptionList_SetButtonEnabled TMaBolts_dclBolts_OptionList1 3 T)
  (dcl_OptionList_SetButtonEnabled TMaBolts_dclBolts_OptionList1 4 T)
)


The buttons aren't refreshing when the should. Only when I mouse over & off of them do they refresh.

thx,
Barry
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

BazzaCAD

a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

Can you reproduce this in one of the samples by any chance?

BazzaCAD

In short, not.

The long answer:
The only sample I could find with OptionLists in it, was the MessageBox, so I tried adding this code:

Code (autolisp) Select

(defun c:MessageBox_MessageBoxes_optIcons_OnSelChanged (ItemIndexOrCount Value /)
(cond
    ((= ItemIndexOrCount 0)
      (dcl_OptionList_SetButtonEnabled MessageBox_MessageBoxes_optButtons 3 T)
      (dcl_OptionList_SetButtonEnabled MessageBox_MessageBoxes_optButtons 4 T)
    )
    ((= ItemIndexOrCount 1)
      (dcl_OptionList_SetButtonEnabled MessageBox_MessageBoxes_optButtons 3 nil)
      (dcl_OptionList_SetButtonEnabled MessageBox_MessageBoxes_optButtons 4 nil)
             
    )
)
)


But it didn't even look like it was firing.... (yes, I checked the OnSelChanged event & saved the project.)
Remember this sample also has the issue of the OptionLists getting bolder every time the mouse passes over them, so I guess this isn't a good test.

I guess I could try making a new test case from scratch....
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom