Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Кто может подсказать: как в Delphi растягивать (Resize ) такие компоненты как TStringGrid? Есть ли примочки, позволяюшие это делать для родных компонентов от Borlanda? Или нужно поискать компонентов-наследников? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.01.2003, 17:08 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
О чем речь? Align - это не то? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2003, 08:03 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Есть. Посмотри свойство Anchors Правда, с ним тоже надо поаккуратнее, а то он при перерисовке такого намудрит - мало не покажется. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2003, 14:01 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Не, это не то. Мне бы что-б мышкой брать и растягивать как в Design-Time? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2003, 23:55 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Придеться самому переписывать методы и создовать объекты потомки :-)) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.01.2003, 23:59 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Использовать cплиттеры? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.01.2003, 06:33 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
поищи в Инете фриварный компонент TStretchHandle можешь начать отсюда http://www.delphi32.com/vcl/2929/download,xid,2929.asp ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.01.2003, 10:26 |
|
||
|
растягивать (Resize ) компоненты
|
|||
|---|---|---|---|
|
#18+
Придеться самому переписывать методы и создовать объекты потомки :-)) Popotel konechno nemnogo - okazalos' vovse eto i ne slozhno :-) TSoloEdit = class(TEdit) private { Private-Deklarationen } fTimerCounter : Byte; fOldCursor : TCursor; fOldDragMode : TDragMode; fLeftOrRand : Boolean; fOldLeft : integer; fEditTimer : TTimer; fResizeable : boolean; ... procedure fEditTimerTimer( Sender: TObject ); protected { Protected-Deklarationen } ... procedure MouseMove( Shift: TShiftState; X, Y: Integer); override; public { Public-Deklarationen } ... constructor Create(AOwner: TComponent); override; destructor Destroy; override; published { Published-Deklarationen } property Resizeable : boolean read FResizeable write FResizeable; end; constructor TSoloEdit.Create(AOwner: TComponent); begin inherited; fEditTimer := TTimer.Create( nil ) ; fEditTimer.Enabled := false; fEditTimer.Interval := 100; //ms fEditTimer.OnTimer := fEditTimerTimer; end; destructor TSoloEdit.Destroy; begin if Assigned( fEditTimer ) then fEditTimer.Free; inherited; end; procedure TSoloEdit.MouseMove( Shift: TShiftState; X, Y: Integer); begin if fResizeable then begin fTimerCounter := 0; if ssCtrl in Shift then begin fLeftOrRand := x < ( Width / 2 ); //ansonst rechte Rand x > (Sender as TEdit ).width - 10 if ssLeft in Shift then CalcPooos( x, y ); if ( x < 10 ) or ( x > width - 10 ) then begin if Screen.Cursor <> crSizeWE then begin fEditTimer.Enabled := true; //starttimer fOldCursor := Screen.Cursor; Screen.Cursor := crSizeWE; fOldLeft := Left; fOldWidth := Width; fOldDragMode := DragMode; DragMode := dmManual; end; end; end else if fEditTimer.Enabled then begin //sofort deaktivieren - auf Timer nicht warten fEditTimer.Enabled := false; Screen.Cursor := fOldCursor; DragMode := fOldDragMode; end; end; inherited; end; procedure TSoloEdit.fEditTimerTimer( Sender: TObject ); begin if GetAsyncKeyState( VK_CONTROL ) < 0 then exit; //Strg ist noch gedrückt! inc( fTimerCounter ); if fTimerCounter = 3 then begin Screen.Cursor := fOldCursor; DragMode := fOldDragMode; end; end; procedure TSoloEdit.CalcPooos( x, y : Integer); var lNewLeft,lNewWidth : Integer; begin if ( Screen.Cursor = crSizeWE ) and fLeftOrRand then // dehnen nach links begin lNewLeft := fOldLeft + x; lNewWidth := fOldLeft - lNewLeft + fOldWidth; if lNewWidth < cMinWidth then begin Width := cMinWidth; Left := fOldLeft + fOldWidth - cMinWidth; end else begin Left := lNewLeft; Width := lNewWidth; end; fOldLeft := Left; fOldWidth := Width; end; if ( Screen.Cursor = crSizeWE ) and ( not fLeftOrRand ) then // dehnen nach rechts begin lNewLeft := fOldLeft; lNewWidth := x; if lNewWidth < cMinWidth then Width := cMinWidth else Width := lNewWidth; Left := lNewLeft; fOldLeft := Left; fOldWidth := Width; end; end; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.01.2003, 11:08 |
|
||
|
|

start [/forum/topic.php?fid=58&msg=32096573&tid=2119243]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
51ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
47ms |
get tp. blocked users: |
1ms |
| others: | 218ms |
| total: | 356ms |

| 0 / 0 |
