Alaska Software Inc. - XbpListBox, drawMode, multicolumns
Username: Password:
AuthorTopic: XbpListBox, drawMode, multicolumns
Paulo PinheiroXbpListBox, drawMode, multicolumns
on Tue, 07 Aug 2012 10:44:50 +0100
Hi all,

I would like to know if someone can tell me if this is a bug or by design, 
and if is a bug if someone has already workaround it:

When using a XbpListBox with
   ::drawMode := XBP_DRAW_OWNER
   ::multicolumns := .T.
the method ::drawItem() is not called!

Using Alaska example in "%Alaska%\XPPW32\SOURCE\samples\basics\OWNERDRW" if
we define
   ::multicolumns := .T.
it stops painting the colors...

TIA
Best Regards,
Paulo Pinheiro
AUGE_ OHRRe: XbpListBox, drawMode, multicolumns
on Tue, 07 Aug 2012 22:53:38 +0200
hi,

> I would like to know if someone can tell me if this is a bug or by design,
> and if is a bug if someone has already workaround it:

Xbase++ use LBS_OWNERDRAWVARIABLE for Ownerdraw
Xbase++ use LBS_MULTICOLUMN for o:multicolumns

***
The LBS_OWNERDRAWVARIABLE style cannot be combined with the LBS_MULTICOLUMN
style. If these two styles are combined, the LBS_OWNERDRAWVARIABLE style is
ignored.
***
so this Combination is not possible "that" Way


greetings by OHR
Jimmy





you can "test" Style this Way

   nStyle  := @user32:GetWindowLongA(hWnd , GWL_STYLE)
   TestStyle(nStyle)

PROCEDURE TestStyle(nStyle)

   
    all Style
   
   IF( lAnd( nStyle, WS_CHILD             ),onDummy("WS_CHILD 
"),NIL)
   IF( lAnd( nStyle, WS_VISIBLE           ),onDummy("WS_VISIBLE 
"),NIL)
   IF( lAnd( nStyle, WS_VSCROLL           ),onDummy("WS_VSCROLL 
"),NIL)
   IF( lAnd( nStyle, WS_POPUP             ),onDummy("WS_POPUP 
"),NIL)

   
    ListBox
   
   IF( lAnd( nStyle, LBS_NOTIFY           ),onDummy("LBS_NOTIFY 
"),NIL)
   IF( lAnd( nStyle, LBS_SORT             ),onDummy("LBS_SORT 
"),NIL)
   IF( lAnd( nStyle, LBS_NOREDRAW         ),onDummy("LBS_NOREDRAW 
"),NIL)
   IF( lAnd( nStyle, LBS_MULTIPLESEL      ),onDummy("LBS_MULTIPLESEL 
"),NIL)
   IF( lAnd( nStyle, LBS_OWNERDRAWFIXED   ),onDummy("LBS_OWNERDRAWFIXED 
"),NIL)
   IF( lAnd( nStyle, 
LBS_OWNERDRAWVARIABLE),onDummy("LBS_OWNERDRAWVARIABLE"),NIL)
   IF( lAnd( nStyle, LBS_HASSTRINGS       ),onDummy("LBS_HASSTRINGS 
"),NIL)
   IF( lAnd( nStyle, LBS_USETABSTOPS      ),onDummy("LBS_USETABSTOPS 
"),NIL)
   IF( lAnd( nStyle, LBS_NOINTEGRALHEIGHT ),onDummy("LBS_NOINTEGRALHEIGHT 
"),NIL)
   IF( lAnd( nStyle, LBS_MULTICOLUMN      ),onDummy("LBS_MULTICOLUMN 
"),NIL)
   IF( lAnd( nStyle, 
LBS_WANTKEYBOARDINPUT),onDummy("LBS_WANTKEYBOARDINPUT"),NIL)
   IF( lAnd( nStyle, LBS_EXTENDEDSEL      ),onDummy("LBS_EXTENDEDSEL 
"),NIL)
   IF( lAnd( nStyle, LBS_DISABLENOSCROLL  ),onDummy("LBS_DISABLENOSCROLL 
"),NIL)
   IF( lAnd( nStyle, LBS_NODATA           ),onDummy("LBS_NODATA 
"),NIL)
   IF( lAnd( nStyle, LBS_NOSEL            ),onDummy("LBS_NOSEL 
"),NIL)
   IF( lAnd( nStyle, LBS_COMBOBOX         ),onDummy("LBS_COMBOBOX 
"),NIL)
   IF( lAnd( nStyle, LBS_STANDARD         ),onDummy("LBS_STANDARD 
"),NIL)

RETURN

it would work if using LBS_OWNERDRAWFIXED
***
If the LBS_OWNERDRAWFIXED style is combined with the LBS_MULTICOLUMN style,
the application can set the width of the columns, as well as the height of
the rows, when responding to a WM_MEASUREITEM message.
***