added wxLB_NO_SB style and implementation for wxMSW (closes #10991)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -383,6 +383,7 @@ All (GUI):
|
|||||||
- Added wxDC::CopyAttributes() and use it in wxBufferedDC.
|
- Added wxDC::CopyAttributes() and use it in wxBufferedDC.
|
||||||
- Added wxTextWrapper helper class useful for wrapping lines of text.
|
- Added wxTextWrapper helper class useful for wrapping lines of text.
|
||||||
- Added EVT_DATAVIEW_CACHE_HINT() event (Trigve).
|
- Added EVT_DATAVIEW_CACHE_HINT() event (Trigve).
|
||||||
|
- Added wxLB_NO_SB style (implemented for MSW only; Dario Senic).
|
||||||
|
|
||||||
GTK:
|
GTK:
|
||||||
|
|
||||||
|
@@ -1709,9 +1709,10 @@ enum wxBorder
|
|||||||
#define wxLB_MULTIPLE 0x0040
|
#define wxLB_MULTIPLE 0x0040
|
||||||
#define wxLB_EXTENDED 0x0080
|
#define wxLB_EXTENDED 0x0080
|
||||||
/* wxLB_OWNERDRAW is Windows-only */
|
/* wxLB_OWNERDRAW is Windows-only */
|
||||||
|
#define wxLB_NEEDED_SB 0x0000
|
||||||
#define wxLB_OWNERDRAW 0x0100
|
#define wxLB_OWNERDRAW 0x0100
|
||||||
#define wxLB_NEEDED_SB 0x0200
|
#define wxLB_ALWAYS_SB 0x0200
|
||||||
#define wxLB_ALWAYS_SB 0x0400
|
#define wxLB_NO_SB 0x0400
|
||||||
#define wxLB_HSCROLL wxHSCROLL
|
#define wxLB_HSCROLL wxHSCROLL
|
||||||
/* always show an entire number of rows */
|
/* always show an entire number of rows */
|
||||||
#define wxLB_INT_HEIGHT 0x0800
|
#define wxLB_INT_HEIGHT 0x0800
|
||||||
|
@@ -39,6 +39,8 @@
|
|||||||
Always show a vertical scrollbar.
|
Always show a vertical scrollbar.
|
||||||
@style{wxLB_NEEDED_SB}
|
@style{wxLB_NEEDED_SB}
|
||||||
Only create a vertical scrollbar if needed.
|
Only create a vertical scrollbar if needed.
|
||||||
|
@style{wxLB_NO_SB}
|
||||||
|
Don't create vertical scrollbar (wxMSW only).
|
||||||
@style{wxLB_SORT}
|
@style{wxLB_SORT}
|
||||||
The listbox contents are sorted in alphabetical order.
|
The listbox contents are sorted in alphabetical order.
|
||||||
@endStyleTable
|
@endStyleTable
|
||||||
|
@@ -77,6 +77,7 @@ wxBEGIN_FLAGS( wxListBoxStyle )
|
|||||||
wxFLAGS_MEMBER(wxLB_HSCROLL)
|
wxFLAGS_MEMBER(wxLB_HSCROLL)
|
||||||
wxFLAGS_MEMBER(wxLB_ALWAYS_SB)
|
wxFLAGS_MEMBER(wxLB_ALWAYS_SB)
|
||||||
wxFLAGS_MEMBER(wxLB_NEEDED_SB)
|
wxFLAGS_MEMBER(wxLB_NEEDED_SB)
|
||||||
|
wxFLAGS_MEMBER(wxLB_NO_SB)
|
||||||
wxFLAGS_MEMBER(wxLB_SORT)
|
wxFLAGS_MEMBER(wxLB_SORT)
|
||||||
|
|
||||||
wxEND_FLAGS( wxListBoxStyle )
|
wxEND_FLAGS( wxListBoxStyle )
|
||||||
@@ -207,10 +208,6 @@ WXDWORD wxListBox::MSWGetStyle(long style, WXDWORD *exstyle) const
|
|||||||
{
|
{
|
||||||
WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
|
WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
|
||||||
|
|
||||||
// always show the vertical scrollbar if necessary -- otherwise it is
|
|
||||||
// impossible to use the control with the mouse
|
|
||||||
msStyle |= WS_VSCROLL;
|
|
||||||
|
|
||||||
// we always want to get the notifications
|
// we always want to get the notifications
|
||||||
msStyle |= LBS_NOTIFY;
|
msStyle |= LBS_NOTIFY;
|
||||||
|
|
||||||
@@ -226,8 +223,16 @@ WXDWORD wxListBox::MSWGetStyle(long style, WXDWORD *exstyle) const
|
|||||||
else if ( style & wxLB_EXTENDED )
|
else if ( style & wxLB_EXTENDED )
|
||||||
msStyle |= LBS_EXTENDEDSEL;
|
msStyle |= LBS_EXTENDEDSEL;
|
||||||
|
|
||||||
if ( m_windowStyle & wxLB_ALWAYS_SB )
|
wxASSERT_MSG( !(style & wxLB_ALWAYS_SB) || !(style & wxLB_NO_SB),
|
||||||
msStyle |= LBS_DISABLENOSCROLL;
|
_T( "Conflicting styles wxLB_ALWAYS_SB and wxLB_NO_SB." ) );
|
||||||
|
|
||||||
|
if ( !(style & wxLB_NO_SB) )
|
||||||
|
{
|
||||||
|
msStyle |= WS_VSCROLL;
|
||||||
|
if ( style & wxLB_ALWAYS_SB )
|
||||||
|
msStyle |= LBS_DISABLENOSCROLL;
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_windowStyle & wxLB_HSCROLL )
|
if ( m_windowStyle & wxLB_HSCROLL )
|
||||||
msStyle |= WS_HSCROLL;
|
msStyle |= WS_HSCROLL;
|
||||||
if ( m_windowStyle & wxLB_SORT )
|
if ( m_windowStyle & wxLB_SORT )
|
||||||
|
Reference in New Issue
Block a user