FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problems With vistamenu Items RESOLVED!!!
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Problems With vistamenu Items RESOLVED!!!
Posted: Tue Mar 04, 2014 12:05 PM
I have this VistaMenu



If I insert bmps for the second and third subitems the bmps are too near , How I can make to make a space from each bmps?
Or How I can Make to move the small bmps at right ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Problems With vistamenu Items
Posted: Tue Mar 04, 2014 05:06 PM

Silvio,

Maybe as a workaround you can just make all the bitmaps the same size either by resizing or just adding space around the original image.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problems With vistamenu Items
Posted: Wed Mar 05, 2014 09:01 AM
James Bott wrote:Silvio,

Maybe as a workaround you can just make all the bitmaps the same size either by resizing or just adding space around the original image.

James



James I tried ... I insert the same small bitmaps as you see on this picture

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Problems With vistamenu Items
Posted: Wed Mar 05, 2014 02:50 PM
Silvio,

I am not sure I understand what you want. Can you show an example of the way you want it to appear? Is there a sample in the \samples directory? I have never used the Vista menu.

If you are looking to get the bitmaps right justified, then maybe try making the left border of the bitmap larger than the right one. Something like this:

Code (fw): Select all Collapse
--------------
|         XXX |
--------------

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: Problems With vistamenu Items
Posted: Wed Mar 05, 2014 05:18 PM

Silvio,

Please look at DATA nHMargen and DATA nVTMargen on the class.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problems With vistamenu Items
Posted: Thu Mar 06, 2014 05:55 PM

:SetMarginH or :SetMarginT methods are for the Vistamenu object

the problem is on item and on TVistaMenuItem

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problems With vistamenu Items
Posted: Thu Mar 06, 2014 06:29 PM
if you add a new Data

on CLASS TVistaMenuItem class
Method Paint

if ::hBmp != 0
if ::lHasAlpha
ABPaint( hDC, nLeft-::nWLeftImage+10, nTop, ::hBmp, ::nAlphaLevel )
else
If ::lMove
DrawMasked( hDC, ::hBmp, nTop, (nLeft+40)-::nWLeftImage+10 )

ELSE
DrawMasked( hDC, ::hBmp, nTop, nLeft-::nWLeftImage+10 )
endif
endif
endif



on test try with

oItem2:= oWnd:AddItem( "Movimenti", "IMAGE_BIG" )
oItem3:= oItem2:AddItem( "Ci sono "+ltrim(str(NumMovimenti))+" movimenti. ",, { || Movimenti() } )
oItem4:= oItem2:AddItem( "di cui "+ltrim(str(NumMovimenti_En))+" sono movimenti di entrata, " ,"sh_small1",)
oItem5:= oItem2:AddItem( "e "+ltrim(str(NumMovimenti_Us))+" sono movimenti di uscita. ","sh_small2",)

oItem4:=.t.
oItem5:=.t.



the small bitmaps are moved on left

and I not Know how insert a new line to make a space from item4 and item5



because the class draw each item and not save on memory if there is a item before ( have lmove=.t.)


any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Problems With vistamenu Items: RESOLVED!!!
Posted: Thu Mar 06, 2014 07:33 PM
Now I resolved !!!!




On METHOD GetCoors() CLASS TVistaMenu

I insert this lines on case ntype:=1

IF ::aItems[n]:aItems[n2]:lMove
nBottom :=nBottom+2
ENDIF


before of ::aItems[n]:aItems[n2]:rcItem := { nTop, nLeft, nBottom, nRight }



THIS RUN ONLY FOR :

oWnd:nColumns := 2
oWnd:nType := 1
oItem2:= oWnd:AddItem( "Movimenti", "BIGIMAGE" )
oItem3:= oItem2:AddItem( "Ci sono "+ltrim(str(NumMovimenti))+" movimenti. ",, { || Movimenti() } )
oItem4:= oItem2:AddItem( "di cui "+ltrim(str(NumMovimenti_En))+" sono movimenti di entrata, " ,"sh_small1",)
oItem4:=.t.
oItem5:= oItem2:AddItem( "e "+ltrim(str(NumMovimenti_Us))+" sono movimenti di uscita. ","sh_small2",)
oItem5:=.t.



oWnd is oVistamenu Object

BIGIMAGE is 32x32

small1 and small2 is 16x16
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion