🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.delphi
5 messages
5 total messages Started by Borneq Mon, 13 Aug 2018 13:14
Lepszy TPageControl
#346691
Author: Borneq
Date: Mon, 13 Aug 2018 13:14
2 lines
950 bytes
Szukam lepszego komponentu TPageControl, takiego, który można tab 
przesuwać za pomocą myszy, chcę zrobić edytor z Synedit z zakładkami.
Re: Lepszy TPageControl
#346692
Author: Bogdan Polak BSC
Date: Mon, 13 Aug 2018 14:27
14 lines
1825 bytes
W dniu poniedziałek, 13 sierpnia 2018 15:14:19 UTC+2 użytkownik Borneq napisał:
> Szukam lepszego komponentu TPageControl, takiego, który można tab 
> przesuwać za pomocą myszy, chcę zrobić edytor z Synedit z zakładkami.

Sprawdź TChromeTabs
https://github.com/norgepaul/TChromeTabs

Możliwości opisane tutaj:
https://stackoverflow.com/posts/13843460/revisions

W nowych Delphi TChromeTabs jest do instalacji przez GetIt'a

Pozdrawiam,
Bogdan Polak
Re: Lepszy TPageControl
#346693
Author: Borneq
Date: Mon, 13 Aug 2018 16:12
4 lines
1094 bytes
W dniu 13.08.2018 o 16:27, Bogdan Polak BSC pisze:
> W nowych Delphi TChromeTabs jest do instalacji przez GetIt'a

Jak się instaluje za pomocą GetIt'a?
Re: Lepszy TPageControl
#346694
Author: Jan Drawski
Date: Mon, 13 Aug 2018 20:04
7 lines
1444 bytes
W dniu 2018-08-13 o 18:12, Borneq pisze:
> W dniu 13.08.2018 o 16:27, Bogdan Polak BSC pisze:
>> W nowych Delphi TChromeTabs jest do instalacji przez GetIt'a
> 
> Jak się instaluje za pomocą GetIt'a?

Tools -> GetIt Package Manager...
Re: Lepszy TPageControl
#346695
Author: Krzysztof Szyszka
Date: Tue, 14 Aug 2018 17:31
45 lines
2177 bytes
> Szukam lepszego komponentu TPageControl, takiego, który można tab przesuwać za pomocą myszy, chcę
> zrobić edytor z Synedit z zakładkami.

Do tego nie potrzeba lepszego komponentu - wystarczy zwykłe drag&drop.

{ PageControl drag&drop events }

procedure TXFDesigner.PageControlMouseDown(Sender: TObject; Button: TMouseButton; Shift:
TShiftState; X, Y: Integer);
begin
  (Sender as TPageControl).BeginDrag(False);
end;

procedure TXFDesigner.PageControlDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState;
var Accept: Boolean);
begin
  Accept := (Sender is TPageControl) and (Source = Sender);
end;

procedure TXFDesigner.PageControlDragDrop(Sender, Source: TObject; X, Y: Integer);
const
   TCM_GETITEMRECT = $130A;
var
   Rect: TRect;
   I: Integer;
begin
  with Sender as TPageControl do
  for I := 0 to PageCount-1 do
  begin
    Perform(TCM_GETITEMRECT, I, @Rect);
    if PtInRect(Rect, Point(X, Y)) then
    with ActivePage do
    begin
      if PageIndex <> I then PageIndex := I;
      Exit;
    end;
  end;
end;

-- 
pozdrowienia
Krzysztof Szyszka, X-Files Software
Developer of X-DBGrid Component
Embarcadero Technology Partner
http://www.x-files.pl/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads