|
Home > Archive > Programming with dBASE > April 2005 > The top part of the menu does not gets activated...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
The top part of the menu does not gets activated...
|
|
| evilaro 2005-04-12, 7:23 am |
| Hello All:
I am using this example by Todd
When open I wanted to translate the menu language....
The upper part of the menu it does not get translated
but when I click on the submenu it does very well.
I have tried the options that now are with *
but no result
I feel the this.menu36.text is not activated
I have used this.root.menu36.text and no luck
I would appreciate some help.
Emilio
** END HEADER -- no elimine esta línea
//
// Generado en 12/04/2005
//
parameter formObj
new EXAMPLEMENU(formObj,
"root")
class EXAMPLEMENU(formObj,
name) of MENUBAR(formObj, name)
with (this)
onInitMenu = class::ROOT_ONINITME
NU
endwith
this.MENU36 = new MENU(this)
with (this.MENU36)
text = "Files"
endwith
this.MENU36.MENU37 = new MENU(this.MENU36)
with (this.MENU36.MENU37)
onClick = class::MENU37_ONCLIC
K
text = "Exit"
endwith
function MENU37_onClick
Form.close()
return
function ROOT_onInitMenu
this.MENU36.TEXT='Ficheros'
this.MENU36.MENU37.text='Salir'
* original sample by TODD
*if TYPE("this.initiated") # "L"
* this.initiated = false
*endif
*if NOT this.initiated
* *fSource = form.query.rowset.fields
* this.menu8.menu9.text = 'HHHHHHHHHHHHHHHH' //fSource['Text'].value
* this.menu8. TEXT='KKKKKKKKKKKKKK
'
*endif
*this.initiated = true
return
endclass
| |
| Robert Bravery 2005-04-12, 1:23 pm |
| hi,
I'm not quite sure I understand you here.
Are you saying that you want to change the text of a top menu item?
Robert
"evilaro" <buzon@evil.es> wrote in message
news:xY0M290PFHA.1528@news-server...
> Hello All:
>
> I am using this example by Todd
>
> When open I wanted to translate the menu language....
> The upper part of the menu it does not get translated
> but when I click on the submenu it does very well.
>
> I have tried the options that now are with *
> but no result
>
> I feel the this.menu36.text is not activated
>
> I have used this.root.menu36.text and no luck
>
> I would appreciate some help.
>
> Emilio
>
>
> ** END HEADER -- no elimine esta línea
> //
> // Generado en 12/04/2005
> //
> parameter formObj
> new EXAMPLEMENU(formObj,
"root")
>
> class EXAMPLEMENU(formObj,
name) of MENUBAR(formObj, name)
> with (this)
> onInitMenu = class::ROOT_ONINITME
NU
> endwith
>
> this.MENU36 = new MENU(this)
> with (this.MENU36)
> text = "Files"
> endwith
>
> this.MENU36.MENU37 = new MENU(this.MENU36)
> with (this.MENU36.MENU37)
> onClick = class::MENU37_ONCLIC
K
> text = "Exit"
> endwith
>
>
> function MENU37_onClick
> Form.close()
> return
>
> function ROOT_onInitMenu
> this.MENU36.TEXT='Ficheros'
> this.MENU36.MENU37.text='Salir'
>
> * original sample by TODD
>
> *if TYPE("this.initiated") # "L"
> * this.initiated = false
> *endif
>
> *if NOT this.initiated
> * *fSource = form.query.rowset.fields
> * this.menu8.menu9.text = 'HHHHHHHHHHHHHHHH'
//fSource['Text']. value
> * this.menu8. TEXT='KKKKKKKKKKKKKK
'
> *endif
>
> *this.initiated = true
> return
> endclass
>
>
| |
| evilaro 2005-04-12, 1:23 pm |
| Robert:
Yes... if I am translatings the I have to change ALL the menu and submenues
Actually the example below makes the translation of the top of the menu
but it does it after you click any option on the menu...
In another words when I open the form I see the top of the menu (in this
case only -Files-)
in english, but from the moment I click on it it gets 'translated'
I feel like if the ROOT_ONINITMENU does not get activated till clicked.
Why
this.MENU36.TEXT='Ficheros'
does not get to work
whereas
this.MENU36.MENU37.text='Salir'
does ???
I hope the question is clear.
Thanks
Emilio
"Robert Bravery" <me@u.com> escribió en el mensaje
news:ZBOJ$o4PFHA.1528@news-server...
> hi,
>
> I'm not quite sure I understand you here.
> Are you saying that you want to change the text of a top menu item?
>
> Robert
>
> "evilaro" <buzon@evil.es> wrote in message
> news:xY0M290PFHA.1528@news-server...
> //fSource['Text'].value
>
>
| |
| Todd Kreuter 2005-04-12, 8:23 pm |
| evilaro wrote:
>
> I feel like if the ROOT_ONINITMENU does not get activated till clicked.
Yes, that would be true. If you need to change the top level menu items,
then I suggest you call the method a bit earlier, like in from the forms
overriden open method:
function form_open
this.root.onInitMenu()
return super::open()
If the form is open with readModal, you will need an overridden
readModal rather than open()
--
Todd Kreuter [dBVIPS]
| |
| evilaro 2005-04-12, 8:23 pm |
| Todd:
I felt I had a problem.... like I would feel that I have a broken leg
...... but from feeling to fixing it takes a DEGREE...
perfect..
Thanks
A lot.
I see a lot of Super::Open on the NG
But I never see it on a actual applicatio!!!
Does the word Super stands for the name of the application..
In my case in the onopen I get
return Editar4FORM::open()
Thanks again
"Todd Kreuter" <tkreuter@dbvips.usa> escribió en el mensaje
news:425C2755.47D37AFA@dbvips.usa...
> evilaro wrote:
>
> Yes, that would be true. If you need to change the top level menu items,
> then I suggest you call the method a bit earlier, like in from the forms
> overriden open method:
>
> function form_open
> this.root.onInitMenu()
>
> return super::open()
>
> If the form is open with readModal, you will need an overridden
> readModal rather than open()
>
>
> --
> Todd Kreuter [dBVIPS]
| |
| Todd Kreuter [dBVIPS] 2005-04-12, 8:23 pm |
| "evilaro" <buzon@evil.es> wrote in message
news:%23Fjsf65PFHA.444@news-server...
>
> Thanks
> A lot.
You're welcome, Emilio.
[color=darkred]
> Does the word Super stands for the name of the application..
>
> In my case in the onopen I get
> return Editar4FORM::open()[
/color]
Super refers to the super class that an object is derived from. In this
case, super refers to the form class, not Editar4Form.
Todd Kreuter [dBVIPS]
|
|
|
|
|