Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi ListBox Scrollleiste entfernen, geht das? (https://www.delphipraxis.net/43173-listbox-scrollleiste-entfernen-geht-das.html)

ensacom 30. Mär 2005 10:02


ListBox Scrollleiste entfernen, geht das?
 
Hallo, ist es möglich in einer Listbox die Scrollbar zu entfernen?

Danke

Wuaegner 30. Mär 2005 10:15

Re: ListBox Scrollleiste entfernen, geht das?
 
Hi,
ich versteh den Sinn nich so ganz. Scrollbalken sind dazu da um zu den Items zu scrollen die nicht mehr sichtbar sind, weil die ListBox zu klein ist, das sie noch draufpassn würdn. Wenn du die Scrollbar jetzt entfernen willst, dann machst du es ja unmöglich diese Items sehen zu können. Dann kannst du sie doch gleich weglassen => wenn alle Items angezeigt werdn können wird auch keine Scrollbar angezeigt.

ensacom 30. Mär 2005 10:18

Re: ListBox Scrollleiste entfernen, geht das?
 
Das ist mir klar. Es hat jedoch durchaus seinen Sinn die Scrollbar zu entfernen.

Ich schreibe ein Programm was über einen Touchscreen gesteuert wird und eine graphische Oberfläche besitzt.

Das scrollen durch die Listbox erfolgt durch zwei Buttons.

Also kann mir eventuell doch einer helfen?

Danke

PeterRettig 30. Mär 2005 10:24

Re: ListBox Scrollleiste entfernen, geht das?
 
Hallo esacom,

ein Befehl in der Art:
Delphi-Quellcode:
SendMessage(ListBox1.Handle, LB_SETVERTIKALEXTENT, PixelLength, 0);
sollte helfen, wobei PixelLength maximal so groß wie die
vertikale Ausdehung der ListBox sein sollte...

Ciao Peter

ensacom 30. Mär 2005 13:16

Re: ListBox Scrollleiste entfernen, geht das?
 
Danke für den Tipp.

LB_SETVERTICALEXTENT wird nicht erkannt, in welcher unit steht das denn? Ich finde auch in der Hilfe, sowie unter Google nichts dazu

Kernel32.DLL 30. Mär 2005 13:46

Re: ListBox Scrollleiste entfernen, geht das?
 
Weil es LB_SETVERTICALEXTENT nicht gibt!

Das PSDK bietet dir das:

Aus dem PSDK Februar 2003:

lResult = SendMessage( // returns LRESULT in lResult
(HWND) hWndControl, // handle to destination control
(UINT) LB_SETHORIZONTALEXTENT, // message ID
(WPARAM) wParam, // = (WPARAM) () wParam;
(LPARAM) lParam // = (LPARAM) () lParam; );

Parameters:

wParam
Specifies the number of pixels by which the list box can be scrolled.
Microsoft® Windows® 95/Windows 98/Windows Millennium Edition (Windows Me) : The wParam parameter is limited to 16-bit values.

lParam
This parameter is not used.
Return Value


An application sends an LB_SETHORIZONTALEXTENT message to set the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden.

Minimum operating systems: Windows 95, Windows NT 3.1


Nimm also LB_SETHORIZONTALEXTENT, müsste in der windows.pas deklariert sein, die Standardmäßig eingebunden ist.

mfg
Daniel

ensacom 30. Mär 2005 14:46

Re: ListBox Scrollleiste entfernen, geht das?
 
Vielen Dank

Shivan 12. Apr 2005 13:07

Re: ListBox Scrollleiste entfernen, geht das?
 
LB_SETHORIZONTALEXTENT ist übrigens in Messages.pas definiert, nicht in Windows.pas.

Grumble 13. Jul 2005 10:19

Re: ListBox Scrollleiste entfernen, geht das?
 
hi,

ich habe das hier beim googlen gefunden und ausprobiert fuer die vertikale scrollbar klappt das, ich habe dabei nur das listview in listbox umbenannt...

http://www.swissdelphicenter.ch/torr...ode.php?id=586


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz