I was wondering how to create a segmented control with just the bottom border like this:
I searched everywhere but I can't find an updated answer because they have just updated how segmented controls look. If anyone could provide the code or get me on the right track it would be very helpful.
I use this link one time Custom segment Button With CGRect
you should try to draw the segment button on a path and you can give any specification you want.
Related
How can i add sub options with segmented control like in the given Screen?
Also i want to inquire about how can i add blurr effect to last/next page views just like the given screen. Thanks for your help
What do you check to see if the up or down arrow in the listbox vertical scroll bar were clicked.
Looked at dozens of post all over the web and no answer.
What I want to do is if they click up or down then make the next visible item in the list the selected one. Make it highlighted.
thanks all
It looks like the control won't do it natively. You will need to implement it yourself. You can use this post as a guideline:
http://www.codeproject.com/Articles/7554/Getting-Scroll-Events-for-a-Listbox
Note that you will need to handle the WM_VSCROLL message rather than the WM_HSCROLL message as depicted in the code sample.
I made an addon HiliteOnSelection, when hilight something it uses the SELECTION_FIND context to highlight other instances. The issue with this is that highlight all feature of find bar uses same controller.
http://mxr.mozilla.org/mozilla-release/source/content/base/public/nsISelectionController.idl#30
Can you please help me to figure out how to create my custom highlight controller and how to style it, the SELECTION_FIND is pink.
This is how i get the selection_find context/controller and highlight with it:
https://addons.mozilla.org/en-US/firefox/files/browse/247620/file/bootstrap.js#L147
let findSelection = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
findSelection.addRange(aRange);
I got this reply from the addon author. He's a nice guy:
Hey Noitidart,
You might find this one helpful:
https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsISelectionController
I'm hardly the master you think I am, actually. :) To change those
colors I just change the values for preferences:
ui.textHighlightBackground ui.textHighlightForeground
ui.textSelectBackgroundAttention -> SELECTION_ATTENTION, it's not a
highlight, it's a normal selection (as you would select some text with
your mouse and it would turn the regular blue blackground, in windows
at least) but it's given "attention", so it has the green background
that the find operation reports. Basically it's a way of showing the
user "Here I am!!" after firefox automatically selecs the text he
searched for.
And I really don't know most of those contants, SELECTION_NORMAL is
for normal text selection, like it would be when you select text with
your mouse, SELECTION_FIND is for the highlights, and I only know the
ON/HIDDEN/OFF/DISABLED ones which are self-explanatory.
SELECTION_SPELLCHECK is probably for the auto-correct when you are
typing in an editable content node, but I'm just guessing that one
from the name.
Also, as far as I know, it's not possible to just create custom
selection ranges/contants, as the code simply won't recognize them
without editing the C++ code as well. Which is actually one of the
reasons I haven't implemented
https://github.com/Quicksaver/FindBar-Tweak/issues/76 yet.
Hope any of this helps. I'm sorry to disappoint on the custom
controller thing.
Luís Miguel
So he changes the colors with a simple pref change. I'm going to have to dig into how that pref changes it.
He also thinks its not possible to create custom controllers without C++, I hope this is not true I'll keep digging if anyone can help that would be great.
I'm trying to find how to realize the effect that like twitter,when click #Xoangle the Xoangle will change color and have a click event.
I searched and someone told me add an UIbutton at # postion.
but how should I get the exactly postion of #?and I want to know is that right direction that I try to use UIbutton to replace #,can it realize?or there are other ways.
thank you for your time to ask my low level question,highly appreciated.
I think you can have a look at OHAttributedLabel: https://github.com/AliSoftware/OHAttributedLabel , it can work for you very well .
I was wondering, if it is somehow possible to add a TextBox in the Application Bar area (the same way the Internet Explorer does), but I didn't find any information source about this. Have you any idea, how to accomplish this task?
You will not be able to add UIElements inside ApplicationBar as it is not derived from UIElement.
Alternatively, you can try adding a Grid at the bottom of the screen and color it similar to the ApplicationBar. Then add a TextBlock inside the Grid. This is just a workaround and not recommended as it is not according to the standards.
You can also check the following link:
http://www.maxpaulousky.com/blog/archive/2011/01/10/bindable-application-bar-extensions-for-windows-phone-7.aspx