For Programmers: Free Programming Magazines  


Home > Archive > PowerBuilder > April 2005 > PB7 -> Check Box Third State









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PB7 -> Check Box Third State
anewhart21

2005-04-14, 3:59 am

I am trying to work with making a check box a halfchecked check. By
doing this I need to use the ThirdState Property. The way I have it
set up is 0=off, 1=on, and 2=halfchecked. It works currently by going

0->2->1->0->2->1...order but I want it to go from 0->1, 1->2, and 2->1
only never 0->2 and 2->0. Any ideas or suggestions on where to look?

I have tried to hard code it the way I want by doing the below chunk in
the itemchanged event of the dw:
lv_s_column_name = dwo.name
lv_s_original = this.getitemstring(row, lv_s_column_name)
//Change the data to be the correct value. The way PB did it was
0->2->1->0->1->2.... We
//need it to go from 0->1, 1->2, 2->1 only.
//0=blank; 1=yes; 2=previously checked
IF lv_s_original = "0" then
data = "1"
elseif lv_s_original = "1" then
data = "2"
elseif lv_s_original = "2" then
data = "1"
end if
this.setitem(row, "pub_ind", data)

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com