Sound like tricky to me..
Sending app request in a popup is a common scenario..
I am trying it to be something static , NO POP UP, USERs should be visible just like any other media on page, with check boxes allowing selection with a send button.
MY guess is something like this.
I need to get the list of the friends and display it with check boxes.
After user selects some particular check boxes, and clicks the send button.
I need to get the list of the friends to generate the dialogue with those ids and send the request..
But even then, As far code is concerned, I am not able to achieve this, little hints would do i guess.
here is the example I want to achieve..
https://www.facebook.com/mittromney/app_159952444141722
Related
I am not very experienced with Qt and I have trouble doing what I want.
In my application, I search for archive files with password on a disk (that part works) and I want to ask the user for the password each time I find one new encrypted archive.
If I find multiple files while user hasn't given any password, I want the dialog for the first password to stay visible until that password is given and then the dialog for the next password can show and so on.
I use some sort of queue to remember which archives need a password, and I am trying to show and hide an unique dialog (actually a Popup) with the info of each archive and get the password from a TextField inside. In the meantime my application is doing other stuff in the c++ code like searching for archives and extracting them when a given password is OK.
My problem is that it is not really working. The dialog shows the first time, I get the first password but then the dialog doesn't show for the next password. Sometimes I can see the dialog a second time, for a few milliseconds, before it disappears without user interaction. My application is blocked because it cannot go on without the unasked passwords.
I get that I am doing something wrong but I don't get what exactly.
Can anyone help ?
I don't know if I was very clear, English is (obviously) not my mother tongue.
I found my mistake.
I did a component based on a Popup.
Inside the onClicked function of the Check or Skip buttons I was doing two things: send accepted() or refused() to trigger custom actions and then close the dialog.
I was doing that in that order, so the accepted or refused action, which among others things triggered the visibility for the "next" password dialog, occurred before the close event, which was setting the dialog visibility to false.
I switched the order and it's way better.
I feel a little silly now but at least I found it.
Using a Telegram Bot, I would like to know how I can send "transparent choice buttons" like in this image.
I dug in the documentation but here, they only explain how to make custom keyboard buttons, in such a way that the android keyboard pops up with custom buttons in order for the user to choose.
With the ones in the image I uploaded, ( the buttons named "<<", "" and ">>" ) a user could vote or navigate intuitively and not be bothered with custom keyboard.
What is the code I need to send them? Then, when an user presses them, how can I handle the choice?
I'm working with Python and Linux.
Thanks in advance.
I searched but couldn't find anything.
All you need to do is implementing inline keyboards that you can find more information about them here.
And for receiving the votes from the users firstly you need a database to store them and secondly you should use callback buttons or callback queries, which are part of inline keyboard markup in telegram bot API.
Here's my use case:
I'd like to display the information about something first using django_tables2, with a button on the top right corner called "Edit", once a user hits "Edit", at the bottom of the table, display a button called "Add New Record", and once the user clicks that button, a bunch of input fields pop up to let users enter values for each field, also the user could continue to click "Add new Record" to keep adding new.
How can I achieve this in Django?
I've read a lot of examples on stackoverflow but didn't find anything tailored to this particular case.
Thanks a lot.
Let's dive right into listing out what you want to do and the requirements you'll need to do so.
You basically want to toggle hiding and showing some functionality for this web page. This is easily accomplished by including the "Edit" button, "Add New Record" button, and popup (most likely in its own <div> somewhere in the page). So the "Edit" button will have the display set to something, be it inline, block, etc., while the "Add New Record" and popup would have a display of "none" or however it is you wish to hide it.
You've got the stuff set up and ready to go but now you need to show it when you click the "Edit" button. This is generally accomplished through Javascript. Just find the "Add New Record" button and switch the visibility.
When you click on the "Add" button you want to display a popup. This can be done in a variety of ways with different libraries. One of my personal favorites is using jquery's blockUI. Why? It doesn't allow the user to click anywhere except in the popup so it's a quick way to handle users trying to reach outside the scope of the popup.
So you've got all the new rows added and you are done editing. Maybe you have a "Save" button or something like that where you can click. When you do, you'll want to push all those new rows you just added to the database. Django handles this well and you could do something like include the new rows in part of the POST request or however you care to implement this solution.
So there's a bit of work ahead of you to get this page up and running with the exact functionality you need but hopefully this starts steering you in the right direction of where you need to go.
I've been following YouTube tutorials most of the day now and I think I've got the basic hang of forms. I'm aiming to create something like this below, which checks a users password and shows how strong it is:
This is what I have at the moment:
I'd like to know the basic theory behind how the top form works, specifically how I can take the user input of password in my form and just get it to print and update in realtime underneath below. I'm not quite sure what tool is used to do that, or for that matter what tool is used to create the colour changing box.
Any help or direction is appreciated, thanks!
Add a keyboardListener to your jtextfield. When a key is pressed get the text and do your stuff(figure out the strength, number of Uppercase etc)
Is this win32 or mfc forms, or some other tech like Qt or wxWidgets?
In both cases you will want to handle messages from the edit field as text is changed in it. This message is the EN_CHANGE message. Handle that message and you can get the text from the edit field and send messages to the strength form to tell it to change its color and text.
Add a System::Windows::Forms::KeyPressEventHandler (or similar) to the TextBox. When raised, do whatever analysis you need to do on the string and update the table below. The color changing box can be one of many implementations. It can be something as simple as a panel that changes its background with a System::Windows::Forms::Label positioned on top of it. It actually looks like that, as the text is not centered.
I would like to display a confirmation message after a choice in the menu.
For example if you want to delete an image in the Timeline, you tap on the glass to open the menu, you select "Delete", you have a progression bar to cancel if you want, when the progressbar is complete a kind of toast appear to say "Deleted" and disappear.
I would like to reproduce only the "Deleted" part but I've searched everywhere and cannot find a way to do it. Is there an API or should I manually implement it with a layout containing the text wanted and display it for 3 seconds... ?
Thanks
There is no API for this to work you will need to build a layout and then set it as the current view using setContentView for a specific amount of time and then return to your main view.