Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Personal Menu

Status
Not open for further replies.

cjulio

Programmer
Aug 14, 2002
114
PT
Hello i am trying to make a personal menu an this is what i have done so far

can any one give me ideas how to make it better now i am trying to make submenu

if any one has any idea pleas tell me


BARRASTA = CREATEOBJ('STANDART')

BARRASTA.Dock(0)
BARRASTA.show

READ EVENTS

DEFINE CLASS Scontainer AS container

ADD OBJECT label1 AS label

Borderwidth = 0
backstyle = 0

picture = ""
HEIGHT = 17

label1.autosize = .t.
label1.backstyle = 0
label1.font = "Arial"
label1.fontsize = 8
label1.left = 6
label1.top = 1.5
label1.forecolor = RGB(0,0,150)

PROCEDURE label1.init

this.parent.Width = this.width + 9

ENDPROC

PROCEDURE label1.mouseenter
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.parent.backstyle = 1
this.parent.picture = "d:\usr\mtfx5\bmp\fbarra.bmp"
this.parent.borderwidth = 1

this.forecolor = RGB(0,0,0)

ENDPROC

PROCEDURE label1.mouseleave
LPARAMETERS nButton, nShift, nXCoord, nYCoord

this.parent.picture = ""
this.parent.borderwidth = 0
this.parent.backstyle = 0

this.forecolor = RGB(0,0,150)

ENDPROC

ENDDEFINE

DEFINE CLASS Scontainerxsoft AS container
Borderwidth = 0
backstyle = 0

picture = ""
HEIGHT = 17

ADD OBJECT label2 AS label
ADD OBJECT label3 AS label
ADD OBJECT label4 AS label
ADD OBJECT label5 AS label

label2.caption = "xSoft"
label2.autosize = .t.
label2.backstyle = 0
label2.font = "Arial"
label2.fontsize = 8
label2.left = 5.5
label2.top = 1.5
label2.forecolor = RGB(245,239,231)
label2.fontbold = .t.

label3.caption = "xSoft"
label3.autosize = .t.
label3.backstyle = 0
label3.font = "Arial"
label3.fontsize = 8
label3.left = 6.5
label3.top = 1.5
label3.forecolor = RGB(245,239,231)
label3.fontbold = .t.

label4.caption = "xSoft"
label4.autosize = .t.
label4.backstyle = 0
label4.font = "Arial"
label4.fontsize = 8
label4.left = 6
label4.top = 1
label4.forecolor = RGB(245,239,231)
label4.fontbold = .t.

label5.caption = "xSoft"
label5.autosize = .t.
label5.backstyle = 0
label5.font = "Arial"
label5.fontsize = 8
label5.left = 6
label5.top = 2
label5.forecolor = RGB(245,239,231)
label5.fontbold = .t.

ADD OBJECT label6 AS label

label6.caption = "xSoft"
label6.autosize = .t.
label6.backstyle = 0
label6.font = "Arial"
label6.fontsize = 8
label6.fontbold = .t.
label6.left = 6
label6.top = 1.5
label6.forecolor = RGB(239,156,39)

PROCEDURE label6.init

this.parent.Width = this.width + 9

ENDPROC

ENDDEFINE

DEFINE CLASS STANDART AS Toolbar

CAPTION = "Menu xSoft"

xpto = 1

borderwidth = 0
borderstyle = 1

sizable = .f.
* movable = .f.

ADD OBJECT lblxsoft AS Scontainerxsoft

ADD OBJECT lbltabelas AS Scontainer
lbltabelas.label1.caption = "Tabelas"

ADD OBJECT lblbancos AS Scontainer
lblbancos.label1.caption = "Bancos"

ADD OBJECT lblterceiros AS Scontainer
lblterceiros.label1.caption = "Terceiros"

ADD OBJECT lblmolduras AS Scontainer
lblmolduras.label1.caption = "Molduras"

ADD OBJECT lblstock AS Scontainer
lblstock.label1.caption = "Stock"

ADD OBJECT lbldocumen AS Scontainer
lbldocumen.label1.caption = "Documentos"

ADD OBJECT lblpvenda AS Scontainer
lblpvenda.label1.caption = "Posto de Venda"

ADD OBJECT lblccorrente AS Scontainer
lblccorrente.label1.caption = "Contas Corrente"

ADD OBJECT lblactualiza AS Scontainer
lblactualiza.label1.caption = "Actualizações"

ADD OBJECT lblopcoes AS Scontainer
lblopcoes.label1.caption = "Opções Globais"

ADD OBJECT lblfim AS Scontainer
lblfim.label1.caption = "Fim"

PROCEDURE lblfim.label1.CLICK

CLEAR EVENTS

ENDPROC

ENDDEFINE
 
Julio,

why not just use the Menu Builder ?

Life can be easy ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top