Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabled Checkbox in the Grid - alignment problem
Message
 
 
To
05/09/2018 01:02:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Miscellaneous
Thread ID:
01661818
Message ID:
01661827
Views:
66
>You need to set alignment after setting the dynamiccurrentcontrol.

Thanks, I changed the code to the following and it solved the problem:
local lcDynamicControl, loColumn, loControl
lcDynamicControl    = [IIF(sales_pt.is_test or sales_pt.loc_suffix=0 or INLIST(sales_pt.mode,8,9), 'Check2', 'Check1')]

for each loColumn in thisform.Grid1.columns
   if type('m.loColumn.check1') = 'O'
      	  IF proper(loColumn.name) = 'Column17'
      	  	 loColumn.dynamiccurrentcontrol = [IIF(AT("TEST", UPPER(sales_pt.salespoint)) = 0 or sales_pt.loc_suffix=0 or sales_pt.mode=8, 'Check2', 'Check1')]
      	  else	 
      	  	loColumn.dynamiccurrentcontrol = m.lcDynamicControl
      	  endif	
	      
	      m.loColumn.Alignment = 1
	      m.loColumn.Check1.Alignment = 1
	      m.loColumn.Check2.Alignment = 1

   endif
   bindevent(m.loColumn,"MouseEnter",thisform.Grid1,"MouseEnter")
   bindevent(m.loColumn,"MouseLeave",thisform.Grid1,"MouseLeave")	
   
   for each loControl in m.loColumn.controls

      bindevent(m.loControl,"MouseEnter",thisform.Grid1,"MouseEnter")
      bindevent(m.loControl,"MouseLeave",thisform.Grid1,"MouseLeave")
     
   ENDFOR
   
endfor
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform