我从FlowLayoutPanel
添加(并删除)控件,并注意到一些严重的闪烁级别。我尝试使用FlowLayoutPanel
{&#34}加载"覆盖Panel
Panel
。写在它上面,但在显示 Private Sub ViewOrders_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Panel2.BringToFront() 'This covers the FlowLayoutPanel in which the custom controls are added
dgvViewOrders.DataSource = dtOrders
For i = 0 To dgvViewOrders.Columns.Count - 1
dgvViewOrders.Columns(i).Visible = False
Next
dgvViewOrders.Columns(0).Visible = True
dgvViewOrders.Columns(2).Visible = True
dgvViewOrders.Columns(10).Visible = True
dgvViewOrders.Columns(12).Visible = True
dgvViewOrders.Columns(12).DisplayIndex = 1
dgvViewOrders.Columns(2).DisplayIndex = 2
dgvViewOrders.Columns(10).HeaderText = "£ Total"
dgvViewOrders.Columns(12).HeaderText = "Date/Time"
CreateSecondPOC(Nothing, Nothing) 'This creates the custom controls
If dgvViewOrders.RowCount > 0 Then
dgvViewOrders.ClearSelection()
dgvViewOrders.CurrentCell = dgvViewOrders.Rows(0).Cells(0)
dgvViewOrders.Rows(0).Selected = True
End If
LoadingComplete = True
Panel2.SendToBack() 'Hide Panel so custom controls can be used
End Sub
之前加载了控件,因此它仍然可见。
以下是我使用的代码(评论在代码中):
BackgroundWorker
我也使用from pyspark.sql.functions import col
spark.createDataFrame(t) \
.withColumn("parsed", (col("Request_time_local") / 1000**3).cast("timestamp"))
尝试了非常类似的东西,但效果相同。
当然,我有一个简单的方法可以解决这个问题吗?