Home » Developer & Programmer » Forms » Understanding procedure for menu scrolling (Oracle 10g developer suite, 10g , winXP)
Understanding procedure for menu scrolling [message #326694] |
Thu, 12 June 2008 05:23  |
durgadas.menon
Messages: 365 Registered: December 2007 Location: Nowhere
|
Senior Member |
|
|
Hi,
I am not able to understand a few parts of the below mentioned procedure called in PL/SQL blocks attached with Menu. The questions are marked between the code. Q - Question, N - Narration
Procedure menu_scroll is
begin
if name_in('system.last_record') = 'TRUE' then
[QUOTE] /*N-This is to check if there is only one record, if yes then then disable all the menu scroll options */[/QUOTE]
if name_in('system.cursor_record') = '1' then
set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuNextxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_false);
else
[QUOTE]/*N - if this current pointer is at the last record then enable the first and previous and disable the next and last options*/[/QUOTE]
set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuNexTxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_false);
/*Q-What does the checked property do?, why are the first and the last options checked */
set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_true);
end if;
[QUOTE]/*Q-Here the name_in('system.cursor_record') is being used to check if this is the first record but in the previous case if was used to check if there was only one record, how come the same clause is used for two different purposes?*/[/QUOTE]
elsif name_in('system.cursor_record') = 1 then
set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuNextTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_false);
else
set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuNextTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_true);
set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_false);
set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_false);
end if;
end;
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 12 07:17:37 CDT 2025
|