aBitmaps of object oEditLbx of txbrwCol class

aBitmaps of object oEditLbx of txbrwCol class

Postby reinaldocrespo » Tue Dec 18, 2012 9:00 pm

Hi everyone!

On an TxbrwColumn object when nEditType is EDIT_LISTBOX, oEditLbx object of class TListBox is created but I don't see how to set aBitmaps property. Is there way to show the listbox with bitmaps?

Code: Select all  Expand view

WITH OBJECT oBrw
   :aCols[ 1 ]:nEditType := EDIT_LISTBOX
   :aCols[ 1 ]:aEditListTxt := { "one", "two", "three" }
...//how can we set abitmaps on object :aCols[1]:oEditLbx ?
END
 



Thank you,


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: aBitmaps of object oEditLbx of txbrwCol class

Postby Rick Lipkin » Tue Dec 18, 2012 9:17 pm

Reinaldo

The list box might work like Edit_Get_button ..

Rick Lipkin


Code: Select all  Expand view

   :aCols[ 1 ]:addbmpfile( "adddbf.bmp" )  // from resource .. or give path name to file
 
User avatar
Rick Lipkin
 
Posts: 2636
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: aBitmaps of object oEditLbx of txbrwCol class

Postby reinaldocrespo » Tue Dec 18, 2012 9:29 pm

Hi Rick;

Right, but that only adds a bmp to the column. I really meant having bmps on the drop down listbox when the edit object is of type listbox:

Image

When you click on the dropdown button of the first column, a listbox opens showing the available options. I'd like to show bitmaps on the dropdown list. I tried oEditLbx:SetItems :=.... on bPreEdit of the edit object at no avail.

Code: Select all  Expand view

      :Status:nEditType := EDIT_LISTBOX
      :Status:aEditListTxt := { "Paid", "Rejected", "Pending", "Received", "UserDef1", "UserDef2" }
      :Status:aEditListBound := { 1, 2, 3, 4, 5, 6, }
      :Status:bEditWhen := { |o| EMPTY( oLbx:User:Value() ) }
      :Status:AddResource( "FlagGreen" )
       :Status:AddResource( "FlagRed" )
       :Status:AddResource( "FlagYel" )
       :Status:AddResource( "FlagGray" )
       :Status:AddResource( "FlagBlack" )
       :Status:AddResource( "FlagBlue" )
       :Status:AddResource( "FlagOrange" )
       :Status:bBmpData := { || oLbx:Status:Value() }
       :Status:bStrData  := { || "" }
      :Status:bOnPreEdit := { |o| o:oEditLbx:aBitMaps := { "FlagGreen", "FlagRed", "FlagYel", "FlagGray", "FlagBlack", "FlagBlue" },;
                                 o:oEditLbx:SetItems := { "Paid", "Rejected", "Pending", "Received", "UserDef1", "UserDef2" } }
 



Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: aBitmaps of object oEditLbx of txbrwCol class

Postby ukoenig » Wed Dec 19, 2012 7:51 pm

Reinaldo,

In xBrowse Method :
METHOD ShowBtnList( nKey ) CLASS TXBrwColumn
...
...
Missing BMP's in Lines :
@ 0, 0 LISTBOX ::oEditLbx VAR nAt OF ::oBrw SIZE 0, 30 ITEMS ::aEditListTxt ;
BITMAPS { ??????? } ;
COLOR aColors[ 1 ], aColors[ 2 ] FONT oFont

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: aBitmaps of object oEditLbx of txbrwCol class

Postby reinaldocrespo » Wed Dec 19, 2012 7:57 pm

Uwe;

Hi.

Right, I noticed that. However, even after the Listbox object has been created, it should be possible to set the abitmaps property array of the Tlistbox object and have the object be refreshed somehow so that the newly assigned bitmaps become visible. That approach would avoid having to override or change TxBrwColumn class source, which is what I was hoping for.



Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: aBitmaps of object oEditLbx of txbrwCol class

Postby ukoenig » Wed Dec 19, 2012 8:01 pm

Reinaldo,

just a quick hardcoded test in xBrowse-class :

aColors := Eval( ::bClrEdit )
oFont := If( ValType( ::oEditFont ) == 'B', Eval( ::oEditFont ), ::oEditFont )
@ 0, 0 LISTBOX ::oEditLbx VAR nAt OF ::oBrw SIZE 0, 0 ITEMS ::aEditListTxt ;
BITMAPS { c_path1 + "Yes1.bmp", c_path1 + "No1.bmp" } ;
COLOR aColors[ 1 ], aColors[ 2 ] FONT oFont

Image

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 39 guests