在下面的代码中,RowHeight引发错误。我该如何分配 调用组件中的RowHeight的值。
这是调用组件代码,在这里我将值分配给ReDraw等,因为将值分配给这些属性很简单
public function woo_giftcard_option( $product_type_options ) {
$product_type_options['woo_giftcard'] = array(
'id' => '_woo_giftcard',
'wrapper_class' => 'show_if_simple',
'label' => __( 'Gift Card', 'woocommerce' ),
'default' => 'no'
);
return $product_type_options;
}
public function woo_giftcard_option_save( $post_id ) {
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
$is_giftcard = isset( $_POST['_woo_giftcard'] ) ? 'yes' : 'no';
update_post_meta( $post_id, '_woo_giftcard', $is_giftcard );
}
下面的代码是主要组件的RowHeight公共属性
Public Const MTXN_SS_TOTALS_ROW As Integer = 1
Private Const ROW_HEIGHT As Short = 500
With sprICSTotalsGrid
.ReDraw = False
.DisplayRowHeaders = True
.DisplayColHeaders = False
.RowHeight(MTXN_SS_TOTALS_ROW, ROW_HEIGHT)
end with
答案 0 :(得分:0)
RowHeight
是indexed property。它的行为几乎就像一个数组属性,其中Integer
部分告诉属性要更新或检索的值。像分配数组索引一样分配给它,就像这样:
sprICSTotalsGrid.RowHeight(MTXN_SS_TOTALS_ROW) = CDbl(ROW_HEIGHT)