Autor Beitrag
Ivy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mo 18.07.11 07:52 
Guten morgen zusammen,
ich habe mal wieder ein für mich unerklärliches, jedoch simples problem^^
und zwar habe ich die "scrollable" eigenschaft meiner listview auf false gestellt, jedoch scrollt sie trotzdem. Habe auch schon versucht per code es zu deaktivieren ohne erfolg.
ausblenden C#-Quelltext
1:
lvwZiel.Scrollable = false;					


Hat jemand ne idee warum das so ist. bin schon am verzweifel :D

Danke
lg
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4809
Erhaltene Danke: 1061

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 18.07.11 09:40 
Hallo Ivy,

diese Eigenschaft steuert (laut MSDN) nur, ob die vertikale Scroll-Leiste angezeigt wird.
Was genau meinst du denn mit "jedoch scrollt sie trotzdem"?
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mo 18.07.11 09:59 
ja es erscheinen eben trotzdem scrollbalken, sowohl vertikal als auch horizontal^^
scrollable ist in den eigenschaften aber auf false gesetzt
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4809
Erhaltene Danke: 1061

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 18.07.11 10:21 
Hallo Ivy,

welchen View verwendest du denn?
Bei "Details" könnte evtl. stackoverflow.com/qu...trol-in-details-mode für dich interessant sein.

Und hast du schon mal im Debugger geschaut, welchen Wert Scrollable hat, nachdem du diesen auf 'false' gesetzt hast (also ob der Wert intern auch angenommen wurde)?
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mo 18.07.11 12:58 
ja scrollable steht eindeutig auf false....

Zitat:
welchen View verwendest du denn?


wie welchen? :D hö?
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4809
Erhaltene Danke: 1061

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 18.07.11 13:18 
Hallo Ivy,

ich meine die Eigenschaft ListView.View: LargeIcon, Details, SmallIcon, List oder Tile?
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mo 18.07.11 13:34 
SmallIcon hab ich...
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4809
Erhaltene Danke: 1061

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 18.07.11 13:54 
Hallo Ivy,

mit SmallIcon habe ich wenig Erfahrung, da ich überwiegend mit Details arbeite.
Aber ich habe im Internet folgenden WinAPI-Aufruf gefunden:
ausblenden C#-Quelltext
1:
2:
3:
4:
[DllImport("user32")]
public static extern int ShowScrollBar(IntPtr handle, int wBar, int bShow);

ShowScrollBar( listView.Handle, 0, 0 );

(intern ruft Scrollable auch nur diese Funktion auf, aber evtl. finden vorher noch einige Abfragen bzgl. des Views statt)
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Mo 18.07.11 14:12 
Zitat:
Der Typ "WindowsFormsApplication1" der Assembly "WindowsFormsApplication9, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" konnte nicht geladen werden, da die Methode "ShowScrollBar" keine Implementierung (keine RVA) hat.


was hat das zu bedeuten, wo find ich die user32.dll?
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4809
Erhaltene Danke: 1061

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mo 18.07.11 15:34 
Hallo Ivy,

das ist eine normale WinAPI-Funktion: ShowScrollBar Function, s.a. pinvoke.net/default....2/ShowScrollBar.html
Und die User32.dll ist ja eine Standard-Library von Windows.

Oder programmierst du unter WinCE?
Ivy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 228



BeitragVerfasst: Di 19.07.11 07:24 
user profile iconTh69 hat folgendes geschrieben Zum zitierten Posting springen:


Oder programmierst du unter WinCE?

nein...

super hat jetzt funktioniert, danke!

Moderiert von user profile iconTh69: Status auf "Frage beantwortet" gesetzt