Combo box limitation ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Combo box limitation ?
Hi,
I am using a combo box and button setup to navigate between cards. However, the combo box does not allow me to enter more than 13 card names even though I have set the number of lines to 30. Is this usual ? Could there be anything preventing the combo box from manipulating more than 13 lines ?
I am using a combo box and button setup to navigate between cards. However, the combo box does not allow me to enter more than 13 card names even though I have set the number of lines to 30. Is this usual ? Could there be anything preventing the combo box from manipulating more than 13 lines ?
Re: Combo box limitation ?
Hi CAsba,
looks like this is a limitation of a combo box control!?
Not documented however...
"the number of lines" only manages how many lines will be displayed WITHOUT a scrollbar in the menu.
Best
Klaus
looks like this is a limitation of a combo box control!?
Not documented however...
"the number of lines" only manages how many lines will be displayed WITHOUT a scrollbar in the menu.
Best
Klaus
Re: Combo box limitation ?
OK, many thanks Klaus
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Combo box limitation ?
Code: Select all
set the visible of the_amount_of_scrolled_pixel of btn "CM" to TRUE

Re: Combo box limitation ?
Richmond.
What Klaus means is:
"You want to set the visible of an integer??"
Craig
What Klaus means is:
"You want to set the visible of an integer??"

Craig
-
- Livecode Opensource Backer
- Posts: 10096
- Joined: Fri Feb 19, 2010 10:17 am
Re: Combo box limitation ?
Aha,
And how would one go about setting up a vertical scrollbar in a combo thing?be displayed WITHOUT a scrollbar in the menu
Re: Combo box limitation ?
Richmond.
Combo boxes do not have a limit to the number of menuItems, nor how many can be displayed at once. As Klaus mentioned, the inspector setting only limits the length of the menuItem list before the OS provides a scrollbar. But that scrollbar is native to the control.
Craig
Combo boxes do not have a limit to the number of menuItems, nor how many can be displayed at once. As Klaus mentioned, the inspector setting only limits the length of the menuItem list before the OS provides a scrollbar. But that scrollbar is native to the control.
Craig
Re: Combo box limitation ?
Playing around, what I see is that the inspector's "Number of lines to Display" only applies to combo boxes. Likely because only that menu button has a scrollbar at all. The other three, I am guessing, simply ignore that value.
They all can display what seems like any number of menuItems. It all depends on how tall your monitor is.
Craig
They all can display what seems like any number of menuItems. It all depends on how tall your monitor is.
Craig
Re: Combo box limitation ?
Well,
It was my experience that the Combo box would not accept any more than 13 items, (for whatever reason), so, as it's only a navigation tool for me - that the user will never see - I got around the problem by adding another combo box that the Navigator button automatically picks up.
Thanks for all the replies.
It was my experience that the Combo box would not accept any more than 13 items, (for whatever reason), so, as it's only a navigation tool for me - that the user will never see - I got around the problem by adding another combo box that the Navigator button automatically picks up.
Thanks for all the replies.
Re: Combo box limitation ?
CAsba
Drag a combo box onto a card and put many lines of random chars "into" it. You can do that in the inspector or by (pseudo):
Whatever. When I click on the combo box, I get a very long list of menu items. The inspector can limit the length of the exposed list.
What did you do?
Craig
Drag a combo box onto a card and put many lines of random chars "into" it. You can do that in the inspector or by (pseudo):
Code: Select all
put 30 lines of text into btn "yourComboBox"
What did you do?
Craig
Re: Combo box limitation ?
I used the property inspector and entered the card names, one after the other, that is one below the other, until when I pressed enter, the cursor did not move to the next line.
Re: Combo box limitation ?
Hi CAsba,
so you entered all the card names manually? Not neccessary in LC!
Create a button, delete or hide it later, and add this script:
Best
Klaus
so you entered all the card names manually? Not neccessary in LC!

Create a button, delete or hide it later, and add this script:
Code: Select all
on mouseup
## LC knows bettr than us how we named our cards
put the cardnames of this stack into tCardNames
## Now put them into your combo box, using: set the text of btn xyz to zx
set the text of btn "your combo box here" to tCardNames
end mouseup
Klaus
Re: Combo box limitation ?
CAsba
If you have your menuItems open, you can use the arrow keys to move up and down along the list, but then you must use the mouse to select a menuItem. I am not sure that pressing "Enter" or "Return" will do anything at all.
The best way to use a control like this is with a "menuPick" handler in the button script, such as:
But since the mouse has to be used to do the actual selecting, barring any special gadgetry you add to the mix, why use any keys at all? The user interface guidelines want everything to be done with the mouse; Open the menu, select a menuItem and click.
Craig
If you have your menuItems open, you can use the arrow keys to move up and down along the list, but then you must use the mouse to select a menuItem. I am not sure that pressing "Enter" or "Return" will do anything at all.
The best way to use a control like this is with a "menuPick" handler in the button script, such as:
Code: Select all
on menuPick pItemName
answer pItemName
answer the label of me
answer the menuHistory of me
go card pItemname -- for your particular use
end menuPick
Craig
Re: Combo box limitation ?
Thank you, guys, good info !