Ładny brzuch
wic, od kilkunastu dni proboje znale sposb by usun z ListView scrollbary lub chociaz sam horizontal. Wszystkie dotychczasowe sposoby nie zadziaay. Bodaje
funkcja ShowScrollbar() itp. Dzi znalazem now(chyba) dobra metode ale nie wiem jak j wprowadzi w kod i zrobi aby zadziaaa poprawnie. oto ona:
Hide the horizontal scrollbar on a listview
Derive a new class from TListview, like this:
type
TNoHScrollListview = Class( TListview )
private
Procedure WMNCCalcSize( Var msg: TMessage );
message WM_NCCALCSIZE;
end;
procedure TNoHScrollListview.WMNCCalcSize(var msg: TMessage);
var
style: Integer;
begin
style := getWindowLong( handle, GWL_STYLE );
If (style and WS_HSCROLL) <> 0 Then
SetWindowLong( handle, GWL_STYLE, style and not WS_HSCROLL );
inherited;
end;
For a vertical scrollbar you just use WS_VSCROLL.
autor tumaczy e:
You install it into the IDE via Component->Install component and then simply
use it like one of the stock components. Once you have installed the component
you can change an existing component to this class this way:
- select the component in the IDE.
- cut it to the clipboard
- switch to the editor window, scroll to the end of the unit
- paste from the clipboard. This inserts the text form of the component.
- change the components name in the pasted text.
- select the text and cut it to the clipboard
- switch to the form, click on the old parent for the component to activate
it, paste the changed control from the clipboard.
- drink some tea
The last step is optional, of course <g>.
jeli sie nie myle oczywicie. wiec , czy moze ktos mi to wytumaczy? prosz...
o, jak ktos nie rozumie to podam link
http://groups.google...68a3d399905307e
Uytkownik 3p3 edytowa ten post 26 sierpie 2005, 22:02
jasne. masz kod komponentu opartego o listview i musisz go zainstalowac. ale gdzie problem?
zanotowane.pl doc.pisz.pl pdf.pisz.pl zsf.htw.pl
funkcja ShowScrollbar() itp. Dzi znalazem now(chyba) dobra metode ale nie wiem jak j wprowadzi w kod i zrobi aby zadziaaa poprawnie. oto ona:
Hide the horizontal scrollbar on a listview
Derive a new class from TListview, like this:
type
TNoHScrollListview = Class( TListview )
private
Procedure WMNCCalcSize( Var msg: TMessage );
message WM_NCCALCSIZE;
end;
procedure TNoHScrollListview.WMNCCalcSize(var msg: TMessage);
var
style: Integer;
begin
style := getWindowLong( handle, GWL_STYLE );
If (style and WS_HSCROLL) <> 0 Then
SetWindowLong( handle, GWL_STYLE, style and not WS_HSCROLL );
inherited;
end;
For a vertical scrollbar you just use WS_VSCROLL.
autor tumaczy e:
You install it into the IDE via Component->Install component and then simply
use it like one of the stock components. Once you have installed the component
you can change an existing component to this class this way:
- select the component in the IDE.
- cut it to the clipboard
- switch to the editor window, scroll to the end of the unit
- paste from the clipboard. This inserts the text form of the component.
- change the components name in the pasted text.
- select the text and cut it to the clipboard
- switch to the form, click on the old parent for the component to activate
it, paste the changed control from the clipboard.
- drink some tea
The last step is optional, of course <g>.
jeli sie nie myle oczywicie. wiec , czy moze ktos mi to wytumaczy? prosz...
o, jak ktos nie rozumie to podam link
http://groups.google...68a3d399905307e
Uytkownik 3p3 edytowa ten post 26 sierpie 2005, 22:02
jasne. masz kod komponentu opartego o listview i musisz go zainstalowac. ale gdzie problem?