Simple Dropdown or List


Donald Walker

My request is for a simple way to create a fairly limited dropdown control that would Not use an array and index.

One that would simply all entry text or numbers in the listing
and then would set the value of the [mydropdown.text] to be whichever one was selected.

No array or idex involved.

That;s it. What say you David in your spare time?


decsoft

Hello Donald,

Cof, cof, cof... what's the problem with "Arrays" or "index"? :)



decsoft

Up! :)



Donald Walker

Too complicated for old guys. I don't like to think that hard. :-)

8 out of 10 times all I need is simple list. Remember my background.

If others think the same then......if not then array it is.

PS

What does UP! mean, like What's UP! or


decsoft

Hello Donald,

The "problem" is how the lists and dropdowns are constructed in the background. In fact we need an Array because App Builder does not write all the HTML code for every item, but, use the AnguarJS "Repeat" directive. This offer advantages like, if you change the Array, then the Dropdown or list reflect that changes automatically. I really don't know if we can do something like you wanted, but I want to think about. But, maybe it's a good idea to take experience with Arrays Donald, sometime must be the first time! :)



Donald Walker

I've been using the arrays, but I have to go into the dark spots of my brain to do that. :-)

I hope you understand I was not asking you to change what you have, Just to add another control (I'm guessing you can do that, but may you get them from some far off space in the galaxy) with a more basic struture, no auto updating but just what you put in is what you get.

Either way no biggy.


decsoft

Hello Donald,

It's ok. But when you said:

Just to add another control [...] just what you put in is what you get.

You know about the Items variable in Dropdown buttons, for example? If you click (at the object inspector) in the "Items" variable, a dialog appear to be filled with the items: what you put in that dialog (one item per line) is what you get in the control...

On the other hand, what about the HTML control? Are you tried with the "HTML Contents" application sample? We can place lists, for example, maybe in a way like you wanted... "just what you put in is what you get". :)



Donald Walker

ok good point. I will consider. Thanks for the dialog as always.


decsoft

Hello Donald,

Certainly I think you must take the control of Arrays/Index, and, use the HTML Control if you wanted. However, I do not want to feel I missing some point or something. I really want to reply you as best as possible and not try to convince you. Ok? :)



Donald Walker

I think it might depend on the type of customer base you are seeking. If they are more like you than me then the array is fine. Based on the other app builders around that I have seen, they are more complex in nature and would push me away. Yours can be a bit daunting to someone at my level but once I get the feel of how it works it is fine but remember I have a lot of NB background as well.

I was never a fan of arrays in NB either as I had become accustomed to the simpler drop downs was generally able to make use of them. So my consideration here is not too imporantant in the grand scheme of things. However, if you are targeting a more novice level of person then I think a basic drop down with just a list like in NB would be a good feature,

Thanks and keep on truckin'

One more question for you: Do you create the controls and actions from scratch or are they components part of Delphi or a combination of both or ? Just curious.

Don


decsoft

Hello Donald,

About the first question (main in this thread) maybe I can look for something like prepare a variable which contains the selected item in a listbox, for example. However, Arrays are so useful... in fact we can use ALL the Array's actions, no matter if the elements are placed in a Select, a MultiSelect or just in memory. We can search elements, find their indexes, remove, push, shift... too much posibilities to be loss Donald.

About the second question, it's a combination of both things: designtime and runtime. At designtime all controls are a little advanded Delphi's panels. At runtime there is another combination of HTML standard controls and AngularJS and Bootstrap CSS enhanced controls.



Donald Walker

David "Array" Esperalta

Nothing is being lost. What you have remains. Only a simpler version is added. :-)

Don "Simple" Walker


decsoft

:D :D :D


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.