Problems With vistamenu Items RESOLVED!!!

Problems With vistamenu Items RESOLVED!!!

Postby Silvio.Falconi » Tue Mar 04, 2014 12:05 pm

I have this VistaMenu

Image

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 ?
Last edited by Silvio.Falconi on Thu Mar 06, 2014 7:40 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problems With vistamenu Items

Postby James Bott » Tue Mar 04, 2014 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems With vistamenu Items

Postby Silvio.Falconi » Wed Mar 05, 2014 9: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

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problems With vistamenu Items

Postby James Bott » Wed Mar 05, 2014 2: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: Select all  Expand view
--------------
|         XXX |
--------------
 

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Problems With vistamenu Items

Postby lucasdebeltran » Wed Mar 05, 2014 5: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: Problems With vistamenu Items

Postby Silvio.Falconi » Thu Mar 06, 2014 5: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problems With vistamenu Items

Postby Silvio.Falconi » Thu Mar 06, 2014 6:29 pm

if you add a new Data

on CLASS TVistaMenuItem class
Method Paint

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

ELSE
DrawMasked( hDC, ::hBmp, nTop, nLeft-::oWnd: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:lMove:=.t.
oItem5:lMove:=.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

Image

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problems With vistamenu Items: RESOLVED!!!

Postby Silvio.Falconi » Thu Mar 06, 2014 7:33 pm

Now I resolved !!!!

Image


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:lMove:=.t.
oItem5:= oItem2:AddItem( "e "+ltrim(str(NumMovimenti_Us))+" sono movimenti di uscita. ","sh_small2",)
oItem5:lMove:=.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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests

cron