//---- Tdxbar
NotDocking - dsNone 为 True时,菜单不可以拖动
IsMainMenu 为false时 菜单变短,自动大小;但是运行时 双击空白处弹出 Customize 设定窗体;
WholeRow 也是显示整行
TdxBarDockControl Tdxbar可以拖动到一个dxDockpanel上面原来是上面有 TdxBarDockControl这个控件,可以在控件栏找到
//Dxbar在运行时可以浮动起来,设定NotDocking 中的dsNone为true即可;
//Tdxbar在运行时,可以拖动到窗体的上方,左边,下边,右边,只要设定 NotDocking 里面的左右上下的值为true即可。
NotDocking = [dsNone, dsLeft, dsTop, dsRight, dsBottom]
//以下两个方法等同都不好,会阻塞很久,
{TThread.Synchronize(TThread.CurrentThread,
procedure
begin
cxbrdtmVehicleOnLine.Caption :=IntToStr(FAllVehicleList.Count)+'/'+IntToStr(FvehicleList.Count);
end
); }
{ TTask.RunOnUIThread(
procedure()
begin
cxbrdtmVehicleOnLine.Caption :=IntToStr(FAllVehicleList.Count)+'/'+IntToStr(FvehicleList.Count);
end) }
{
TLabel 写caption是线程安全的,而且很快
lblVehicleOnLine.Caption:=IntToStr(FAllVehicleList.Count)+'/'+IntToStr(FvehicleList.Count);
TcxBarEditItem 在线程中 写是线程不安全的,会异常整个程序死掉 用PostMessage和SendMessage 都不行。
cxbrdtmVehicleOnLine.Caption := IntToStr(FAllVehicleList.Count)+'/'+IntToStr(FvehicleList.Count);
//PostMessage(self.Handle, WM_Subscrible_Number,0, 0);
//SendMessage(self.Handle, WM_Subscrible_Number,0, 0);