在Java文档中说:(关于Pane(JavaFX))
Pane调整每个受管理孩子的大小,无论孩子是否可见 财产价值;
如何禁用此调整大小?
答案 0 :(得分:2)
在您不希望由窗格管理的节点上调用Imports System.Data
Imports System.Data.OleDb
Public Class form7
Dim inc As Integer
Dim con As New OleDb.OleDbConnection
Dim cmd As OleDbCommand
Dim dbprovider As String
Dim dbsource As String
Dim str As String
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim TotalRows As Integer
Dim ID_Number As Integer
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Bank\db1.accdb ")
con.Open()
Dim cmd As New OleDbCommand("SELECT COUNT(*) FROM accountsTable", con)
Dim totalRows As Long = CInt(cmd.ExecuteScalar())
cmd.ExecuteNonQuery()
textbox1.Text = totalRows + 1000
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Form5.Show()
dbprovider = "Provider=Microsoft.ACE.OLEDB.12.0; dbsource=Data Source=D:\Bank\db1.accdb"
MsgBox("Database is now open")
'First_Name,Middle_Name,Last_Name,DOB,Age,Occupation,Marital_Status,Address,Account_Number)
str = "insert into accountsTable values(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & CDate(DateTimePicker1.Text) & "','" & TextBox6.Text & "'," & TextBox7.Text & ",'" & TextBox8.Text & "','" & TextBox9.Text & "','" & ComboBox1.Text & "','" & ComboBox2.Text & "','" & ComboBox3.Text & "','" & ComboBox4.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" & TextBox13.Text & "')"
cmd = New OleDb.OleDbCommand(str, con)
cmd.ExecuteNonQuery()
MsgBox("Record is inserted")
con.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
DateTimePicker1.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
ComboBox4.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
Form3.Show()
End Sub
End Class
。
如果希望节点在将visible设置为false时不占用空间,则可以将托管属性绑定到visible属性:
setManaged(false)