powerbuilder - Get objects of DataWindow band -
how can array of objects in specific band, detail or header example?
i success objects using:
dw_1.describe("datawindow.objects")
you need datawindow.visualobjects
property lists visible objects , each object, ask object_name.band
check if want it.
an example reuses pbniregex (that provides uo_regex
object in code below) simplify properties parsing :
public function long of_get_band_controls (string as_band_name, ref string as_controls[]); string ls_empty[] int i, j as_controls[] = ls_empty[] uo_regex lnv_regex lnv_regex = create uo_regex lnv_regex.initialize( "([^\t]+)", true, false) = lnv_regex.search( describe("datawindow.visualobjects") ) j = 1 if describe( lnv_regex.match( j ) + ".band" ) = as_band_name as_controls[ upperbound(as_controls[])+1 ] = lnv_regex.match( j ) end if next destroy lnv_regex return upperbound( as_controls[] ) end function
that code comes datawindow herited object, hence gets direct access describe
method.
Comments
Post a Comment