在我的项目中,我遇到了一个wicket面板的问题。假设我们有一个扩展了WebPage的现成页面
public class MyPage extends WebPage {
public MyPage(){
add(new Label("some id","Hello"));
}
}
和Panel扩展Panel
public class MyPanel extends Panel{
public MyPanel(){
// here need to add content of MyPage
// for example :
我偶尔使用一个递归函数--我想重用它来显示页面上的所有内容,可能隐藏在占位符/面板中(可能在某个视图中)。
Public Shared Sub ShowAllPanels(ByVal parent As Control)
For Each c As Control In parent.Controls
If c.Controls.Count > 0 Then
ShowAllPanels(c)
Else
Select Case (c.GetType().ToString())
我在占位符中创建了一系列面板,每个面板中有5个文本框。
在按下按钮时,我希望从每个文本框中获取.Text和面板的ID。我计划使用JaggedArray来跟踪所有面板及其内部TextBoxes。
string[][] jaggesaddress = new string[stop][]; //stop is an int and equal to amount of panels on screen.
String[] numbers = new String[stop];
int a = 0;
//Control ctrl;
foreach (Co
如果我将一个组件类添加到包含一些公共控件的项目中,如何在主窗体的面板中显示它的实例?
我使用它来创建我的类的一个实例: Component test = new Component1();其中Component1是我的组件类的名称
那么我该如何做这样的事情:panel1.Controls.Add(测试);?或者,有没有一种不使用面板的方法?
假设我有一个表单,在我的表单下我有一个面板,在面板下面我有一个组框,在这个面板下我有另一个面板,在这个面板下面我有一个多个复选框,现在,我如何计算被选中的复选框的数量,以及如何得到复选框的值,并将其放入数组中。我有密码但不起作用。
我的代码:
Dim list As New ArrayList
Dim count As Integer
count = 0
If TypeOf element Is CheckBox Then
If cb.Checked Then
list.Add(cb.T