小编kta*_*rik的帖子

图片框上的图像清晰

如何清除图片框上的绘图图像?以下对我没有帮助:

pictbox.Image = null;
pictbox.Invalidate();
Run Code Online (Sandbox Code Playgroud)

请帮忙.

编辑

private void pictbox_Paint(object sender, PaintEventArgs e) 
{ 
     Graphics g = e.Graphics; 
     vl.Draw(g, ref tran.realListForInsert); 
} 

public void Draw(Graphics g, ref List<double> arr) 
{ 
    g.DrawRectangle(new Pen(Brushes.Red, 3), nodeArr[Convert.ToInt32(templstName)].pict.Location.X, nodeArr[Convert.ToInt32(templstName)].pict.Location.Y, 25, 25); 
    g.DrawRectangle(new Pen(Brushes.Green, 3), nodeArr[Convert.ToInt32(templstArgName)].pict.Location.X, nodeArr[Convert.ToInt32(templstArgName)].pict.Location.Y, 25, 25); 
    nodeArr[Convert.ToInt32(templstName)].text.Text = arr[Convert.ToInt32(templstArgName)].ToString(); 
    arr[Convert.ToInt32(templstName)] = arr[Convert.ToInt32(templstArgName)]; 
} 
Run Code Online (Sandbox Code Playgroud)

.net c# picturebox winforms

37
推荐指数
6
解决办法
16万
查看次数

如何在wordpress中获取类别

我想获得wordpress网站中的所有类别,但是分别是父类和子类(以这种方式,我很容易为其设置风格).在下面的代码中,我获得了父类别,但是每个父类都重复了所有子类别.谢谢!

<?php
$args = array(
    'orderby' => 'name',
    'parent' => 0
);
$categories = get_categories( $args );
$categories_sub = get_categories();
foreach ( $categories as $category ) {
    echo '<ul class=" span-5 colborder list_main "> <a href="' . get_category_link(     $category->term_id ) . '">' . $category->name . '</a><br/>';
    foreach ( $cat->parent > 1 and $categories_sub as $cat) {
        $temp=$category->name + '/';
        if(get_category_parents($cat)==$temp) {
            echo '<a href="' . get_category_link( $cat->term_id ) . '">' . $cat->name . '</a><br/>';
        }
        $temp="";
    }
    echo '</ul>'; 
} …
Run Code Online (Sandbox Code Playgroud)

css php wordpress

1
推荐指数
1
解决办法
8022
查看次数

标签 统计

.net ×1

c# ×1

css ×1

php ×1

picturebox ×1

winforms ×1

wordpress ×1