Subject Re: combobox / msgbox
From Lee Grant <camilee@nospam.comcast.net>
Date Fri, 16 Feb 2024 15:26:12 -0500
Newsgroups dbase.getting-started

Mervyn,

Ahhh...okay, thanks.

I guess not recognizing it is due to my not using an array with it,
other than hard coded, and I usually use a table field, albeit a small
table.

It just looked similar to me, to the sample ArrayRowset code being used
as a rowset, and I thought I remember the information provided saying
regular arrays couldn't be used before as a mechanism and that's why
they developed the ArrayRowset.

Still learning. I'm going to have to try that now, I guess, although to
me, it almost seems like using an array in memory for it, as being
similar to using the mVars back when. ::shrug::

Lee

On 2/16/2024 7:21 AM, Mervyn Bick wrote:
> On 2024/02/16 10:31, Lee Grant wrote:
>> Mervyn,
>>
>> Admittely, I'm not this advanced and especially in the use of Array
>> and especially not ArrayRowsets, but looking at this code, he seems to
>> be trying to use an Array, like an ArrayRowset, for a rowset.
>>
>> Correct me if I'm wrong, but I think he needs to check out the sample
>> of the ArrayRowset if that is what he is trying to do with a regular
>> Array.
>
> A combobox has various options when it comes to assigning lists to its
> datasource property.  The most used option is to assign an array to the
> property although one can assign a field from a rowset.
>
> When a combobox opens the first value in the list, be it an array or a
> field in a rowset, assigned to the combobox's datasource property is
> displayed in the combobox's entryfield
>
> Michel has opted to build an array from the data in the field because he
> has more control.  He has added a blank element at the start of the
> array so that when the form opens nothing is displayed in the entryfield.
>
> Michel, it's not written on tablets of stone, but I prefer not to add a
> blank element to the array.  Sooner or later the user is going to select
> that blank element and is going to wonder why your program doesn't
> react.   I prefer to use the form's onOpen event handler to place a
> message in each combobox so that the user has an idea of what the
> combobox is for.
>
> I've made some changes to your form which is attached.
>
> I've added an entryfield to show what record is selected.  The
> entrifield's tabstop property is set false so as to keep it out of the
> z-order.
>
> Mervyn.
>
>
>