FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour aBitmaps of object oEditLbx of txbrwCol class
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
aBitmaps of object oEditLbx of txbrwCol class
Posted: Tue Dec 18, 2012 09: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 (fw): Select all Collapse
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.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: aBitmaps of object oEditLbx of txbrwCol class
Posted: Tue Dec 18, 2012 09:17 PM
Reinaldo

The list box might work like Edit_Get_button ..

Rick Lipkin


Code (fw): Select all Collapse
   :aCols[ 1 ]:addbmpfile( "adddbf.bmp" )  // from resource .. or give path name to file
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: aBitmaps of object oEditLbx of txbrwCol class
Posted: Tue Dec 18, 2012 09: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:



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 (fw): Select all Collapse
      :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.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: aBitmaps of object oEditLbx of txbrwCol class
Posted: Wed Dec 19, 2012 07: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 :-)
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.
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: aBitmaps of object oEditLbx of txbrwCol class
Posted: Wed Dec 19, 2012 07: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.

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: aBitmaps of object oEditLbx of txbrwCol class
Posted: Wed Dec 19, 2012 08: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



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.

Continue the discussion