I am making a telegram chatbot with python. I need to add a lot of options (around 185) in the keyboard for the users to select. For e.g. they press a button topic which leads to a "message please select your topic" then a new replyMarkupKeyboard with these 185 buttons.
Having trouble making a keyboard with so many buttons, I tried enabling the keyboard_resize=True but to no avail. After a certain number of buttons the keyboard becomes cluttered and the topics become squished. For e.g. when topics are few: Politics, Sports etc. when topics are more Pl, Sp, etc. The words on these buttons get squished.
I want a slider or dropdown in my keyboard to accommodate these 185 buttons.
Please help
I want a slider or dropdown in my keyboard to accommodate these 185 buttons
Unfortunately, there is no slider or dropdown option in Telegram Bot API.
As a workaround I can suggest two options:
Implement pagination with buttons like Next 10 topics / Previous 10 topics to show topics in chunks.
Add inline search, which will allow user to find appropriate topic by typing a substring to search for. #gif bot is an excellent example.
Anyway, there is no easy solution for this kind of problem.
Thanks #Ivan Vinogradov , I worked around that problem using an If condition on topics and by creating categories.Like if category=1 then show these 10 topics ...so on and so forth I was able to manage this part.
Related
I have written an app that makes extensive use of custom right-click menus on an Access form. The code works great and the user loves it, but lately I am having trouble making it work properly.
In earlier versions of Access it worked well, but newer version seem much more limited in how many items can be put in such menus. The documentation is silent on the matter, and nobody in any newsgroup has had any useful ideas, but I regularly get random error about stack space, out of memory, and general lockups when populating the menus. Doing a C&R used to help, but now even that is not enough, and some menus I can no longer populate at all.
I tried building an app that just built menus until it crashed, to get some idea of what the limits may be, and I am well below what that indicated, but the experimental app had nothing else, while the real app has a great deal else.
Is there any information on how much stuff can be put into these menus, and what the menus share space with? There may be something I can do another way to make more room for the menus. I tried moving all code out of the form, leaving only event stubs that called routines in standard code modules, but that did not help.
And how are they stored/activated? The app is MUCH slower to load when it has these menus, even though no code is running on start-up.
********** Edited to add this:
I use VBA to create a menu, like this:
Application.CommandBars.Add "RCStat", msoBarPopup, False, False
then add it to a control. like this:
Application.CommandBars.cboStat.ShortcutMenuBar = "RCStat"
I add controls (only popups and buttons) like this:
Application.CommandBars.Controls.Add(type:=msoControlPopup)
Application.CommandBars.Controls.Add(type:=msoControlButton, Parameter:="StatKod = 77")
It runs perfectly and the menu items work exactly as expected, except that it bombs after adding some number of controls. It doesn't seem to matter where I add them, just the total number of added controls hits some undefined threshold, and the app crashes.
I got the original code from Getz, Litwin and Gilbert, 2000 edition. Back then, it worked great. But as the versions advance and the app accumulates data, it is becoming less and less functional. However, there are only around 10,000 records, and the app itself is less than 100MB - nowhere close to any of Access's upper size limits.
Pete,
I've done quite a bit of work with shortcut menus, and created the Access Shortcut Tool about 5 years ago, but have never attempted a menu with so many controls although some have 3 or 4 levels.
I am not aware of any restrictions on the number of elements in the commandbars collection, but I find that shortcut menus with too many options, like lists and combo boxes with too many items, are difficult for users to navigate. I generally break these up into segments and use buttons in the form header to display the appropriate menu. Sorry I'm unable to provide anything more helpful.
Dale
We have a commercial product, Total Access Components, that includes as one of its 30 components a right click popup menu that can include icons and font styles.
Here's the info for the popup menu control: https://fmsinc.com/MicrosoftAccess/controls/components/popup-menu/
There's a free trial if you want to try it.
I have searched google/stackoverflow etc. for answer to my question, but I didn't quite manage to find the right one. I believe I just don't know, how to set the question properly, and thus I cannot find solution.
Is there any way, how to create grid like I drawed in following image (with red colour):
I need to add this red grid to several images, which look very simmilar. The grid field (the one selected) have rolling menu, prescribed position, and a field for additional text. Black lines in background are image in background, and the red supposed to be grid above the image. I thought of creating a lot of buttons alined to each other, but i think that is very bad way to do so.
I would like a pop-up menu from selected field, but opening new activity with same fields is usable aswell. Is there any "simple" solution for creating such grid/menu ?
Btw, I am not programmer with many experience with coding, let's say, I know basics only.
Thanks in advance.
Frankly speaking I am not sure if this is the right question for this forum. If its not, feel free to point me as to where to post it. I am just looking for an image that has all the controls provided by WinJS (e.g., rating, toggle switch, list view, flip view etc). On MSDN I find places where it list all controls (like this) but not an image that shows all these controls. May be I am not using right keywords during my google search. Anyone has any links for this?
This may not be an exhaustive list, but one of the presentations of the Windows 8 Training Kit includes a Windows 8 UI presentation where many (all?) of the widgets are covered. When you download, it's in the Presentations\05 - UI Controls folder. Here's one of the slides to give you a feel of what's there:
Okay, I've seen the webpage that shows you how to enter a decimal key on the number pad, but that's pretty complicated for one button, and the problem I have involves multiple buttons. See, I have a program that involves typing in functions like "x + 5". My problem right now is that the user has to go through three different keyboards just to enter that kind of function. I need to know if it's possible to set up a keyboard that will have specific keys in it. Is there a way to do this that's simpler than the decimal key method?
You'll have to create a custom keyboard if none of the apple keyboards toots your flute.
The easiest way to do this is to create a view and add lots of buttons with their own titles and background images and, most importantly, actions. You'll also need a delegate.
To be more official, there are numerous online tutorials (and lots of SO questions).
I'm working on a prototype app that has a challenging behavior. I thought I'd ask for advice before really tearing into it...
Part of the app has an area of text that needs to be formatted in a manner where there will be a description of an item in bold, followed by one or more detail items:
Item Description: Item Detail 1. Item Detail 2. Item Detail N.
In most cases these items will require multiple lines, so word wrapping will be necessary.
The the user will be able to tap on any bolded item description to expose a popover with options they can select that will populate the plain item details.
I was about to attempt doing this with a webview, to be able to format the text, provide natural word wrapping and use hyperlinks to call methods, etc... As I look into this more, I can see it will be a pretty weighty task and want to make sure there aren't alternatives to this before I head down what looks like a fairly long, dark tunnel.
I'm still fairly new to iOS dev, so bear with me if I come back with "noob" questions.
Thanks in advance!
The alternative is Core Text but it is a fairly long, dark tunnel, too.