Re: Enable and disable buttons in a database block
Date: Tue, 22 Jul 2003 22:25:58 GMT
Message-ID: <VRiTa.109917$wk6.28606_at_rwcrnsc52.ops.asp.att.net>
Hello,
I had to deal with this kind of situation once with List Boxes, each had
to keep specific value lists
appropriate to the values in that specific record. It was a pain to keep
everything Synchronized, there
was many triggers to account for.
Buttons should be easier. Regardless of how many records are in your list,
you said ten records
are displayed, right? So, you need exactly ten Buttons then, put them in a
separate block, and you
will probably want to name them something like button0 through button9,
here's why:
Your Button for the Current record your on is Your :System.Cursor_Record
minus
Get_block_property(your_block, TOP_RECORD) = Your Button Number (0-9).
Make it Visible if appropriate. Make the Original Buttons Disabled.
You should put this In a POST-QUERY trigger, and After an EXECUTE_QUERY do a
LAST_RECORD then FIRST_RECORD, this will make your Scrollbar Accurate and
Initialize
the Items Displayed.(Hopefully you don't have a million records, it could
slow things down a bit)
You will also need a WHEN-NEW-RECORD-INSTANCE trigger to Reset the Displayed
Buttons
when you navigate about.
I hope I could help out,
Aaron V.
"Manikandan" <member12054_at_dbforums.com> wrote in message
news:3132646.1058765277_at_dbforums.com...
>
> Hi,
> The number of rows in a block will be varying at run time based on
> the number of rows in a table.So how will i determine the number of
> buttons at run time?
>
> --
> Posted via http://dbforums.com
Received on Wed Jul 23 2003 - 00:25:58 CEST