randydom
-
Постов
3 -
Зарегистрирован
-
Посещение
Сообщения, опубликованные randydom
-
-
i'm trying to accomplish a kind of ListView Items hide mechanism by setting ListView.Item[x].Height:=0 , But that didn't give any result
Adding Items :
procedure TForm6.AddItemsClick(Sender: TObject); var I:Integer; AItem: TListViewItem; begin for I := 0 to 5 do Begin AItem := ListView1.Items.Add; //with AItem do // Text := 'Text'; End; end;
Trying to hide Items :
procedure TForm6.HideItemsClick(Sender: TObject); var I:Integer; begin ListView1.BeginUpdate; try for I := 0 to ListView1.ItemCount-1 do // ListView1.Items.Item[I].Height:=0; // doesn't give any result ListView1.Items.Item[I].Height:=1; finally ListView1.EndUpdate; end; end;
The Result :
Any help to fix this please ? or why
ListView1.Items.Item.Height:=0;
Has no effect ?
-
I've a VCL Component that i want to port it into FMX
type TMyVclComponent = class (TCustomControl) ... procedure TMyVclComponent.MouseUp (Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin FIsMouseDown: = false; end; procedure TMyVclComponent.Paint; begin if csDesigning in ComponentState then with inherited Canvas do begin Pen.Style: = psDash; Brush.Style: = bsClear; Rectangle (0, 0, Width, Height); end; TBackground(FBackground).PaintOn(FBitmapPreveiw); Canvas.Draw (0, 0, FBitmapPreveiw); end;
My porting progress :
type TMyFMXComponent = class(TStyledControl) ... procedure TMyFMXComponent.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin FIsMouseDown := false; end; procedure TMyFMXComponent.Paint; begin { How can we port this code part ? } if csDesigning in ComponentState then with inherited Canvas do begin Pen.Style := psDash; Brush.Style := bsClear; Rectangle(0, 0, Width, Height); end; TBackground(FBackground).PaintOn(FBitmapPreveiw); Canvas.Draw(0, 0, FBitmapPreveiw); end;
How the code inside the Paint procedure can be ported to FMX ?
thank you .
VCL procedure to FMX
в Изображения
Опубликовано
Hello , please can someone helps me porting this VCL procedure into FMX :
so many thanks .