Jump to content

Drummer1972

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by Drummer1972

  1. Drummer1972

    Doubts about THorzScrollBox operation

    I have one THorzScrollBox with three TGridLayouts (c++ Builder 11): ¿Can I move it around with the mouse (ShowScrollBars=false)? Any ideas.. THANKS
  2. Drummer1972

    Doubts about THorzScrollBox operation

  3. Drummer1972

    Pass working delphi code to c++ builder

    Hello I work with C++ and I need to use this code written in Delphi (it works): Var A:Integer; Var LastPanel : Double; Begin For A:=0 to HorzScrollBox1.Content.ChildrenCount-1 do TGridLayout (HorzScrollBox1.Content.Children[A].widht:= HorzScrollBox1.width; HorzScrollBox1.ViewportPosition:=TPointF.Create(LastPanel * HorzScrollBox1.width,0 ); End; I have implemented only : for (int a=0; a<=HorzScrollBox1->Content->ChildrenCount-1;a++) { TGridLayout(HorzScrollBox1->Content->Children[a])->Width = HorzScrollBox1->Width} HorzscrollBox1->ViewportPosition= On the line : "TGridLayout(HorzScrollBox1->Content->…” it gives me the error : matching conversion for functional-style cast from 'Fmx::Types::TFmxChildrenList' to 'Fmx::Layouts::TGridLayout'" lso I think that TPointF is a type included in SystemTypes.h. It's possible?. THANKS
  4. Drummer1972

    Pass working delphi code to c++ builder

    Thank you very much for answering.. I use rad studio 11. Volvo has given me the solution and it is the following: for ( int A = 0 ; A < HorzScrollBox1 - > Content - > ChildrenCount ; A ++ ) { static_cast < TGridLayout * > ( HorzScrollBox1 - > Content - > Children - > Items [ A ] ) - > Width = HorzScrollBox1 - > Width ; } dobleÚltimoPanel = 1.0 ; // <--- solo un ejemplo, ponga su valor aquí HorzScrollBox1 - > ViewportPosition = PointF ( LastPanel * HorzScrollBox1 - > Width, 0.0 ) ;
×