[SOLVED] Panel bar lazarus / 31-LCL ---------------------------------------------------------------------- Pe3s · 2022-11-14 17:17 Hello forum members, I wanted to create a custom bar from the TPanel component. I wrote the beginning, but I was concerned with the calculation of the position of the bar. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Panel2MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);var  NewX, Max: Integer;begin  if not(ssLeft in Shift) then Exit;  NewX := X + Panel2.Left;  Max := Panel1.ClientWidth - Panel2.Width;  if NewX < 0 then NewX := 0;  if NewX > Max then NewX := Max;  Panel2.Left := NewX;end; 0. zero point 1st belt position 2.100% Can I ask for help in finalizing? ---------------------------------------------------------------------- howardpc · 2022-11-14 18:37 Do you mean something like the attached adapted project? ---------------------------------------------------------------------- Pe3s · 2022-11-14 18:49 That's exactly what I wanted to do. Thank you very much. Greetings with a smile