FREE: Window-Eyes Online Interactive App Development Classes
Hi!
I mentioned to Chip today that the setting up menu's along with the IniFile
default, in both cases there lacking in good explanations and details. The
IniFile default is only good as an alternative to having nothing and not for
setting a default...only good for testing.
Below is what I figured out but not from a direct reading of the Object
manual.
first in the manual you get an explanation of the menu and it's setting up
along with a simple example.
then down in the dialog section it mentions in an example how to get a menu
item, but it is not the same.
Nothing mentioned to why that example and the other menu object and it's
example are different, but works in the event.
then, with no explanation nor examples, nor any properties the creation of
a menu object is given in the dialog section... BANG!
so, why was one mentioned way back, then mentioned with parens later, but
no connection between the 2 and the need for one gets the other?
The parens shown are not even needed but placed in the example.
Once I figured out that you had to create the menu in the dialog then the
other syntax came into play, but no clue until I figured it out.
Anyway, below works, and you have to create the menu inside the dialog even
though when monitoring the events you use dialog format, but not until you
create the menu object, then and only then can you use the menu properties...
NOTE: I had to guess that Text would be a property for there was no mention of
that any where in the manual...
Very frustrating, if giving classes, can't you at least get the manual a
little better reading?
Working Dialog with menu's:
Set myDialog = dObj
Set myDialogMenu = dObj.Menu
myDialogMenu.Checked( "menu_hourly_DateTime") = INIFile(myINIFile).Number(
"Configuration", "Enhance_Hotkey", False)
myDialogMenu.Text( "menu_edit_sleep") = timeTextValues( "Sleep Edit: ",
sleepHour, sleepMinute)
myDialogMenu.Text( "menu_edit_wakeup") = timeTextValues( "Wakeup Edit: ",
wakeHour, wakeMinute)
myDialogMenu.Text( "menu_edit_alarm") = timeTextValues( "Alarm Edit: ",
alarmHour, alarmMinute)
Bruce