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 .
Related
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.
I am trying to remove update cancel buttons.
but no any config's are available for this.
I have tried to override but i cant remove this.
please if you have done task like this or know how to do this help me.
You're absolutely right that there is no built-in way to hide the update and cancel buttons with the row editing plugin.
You could try to hide the button bar via CSS. The normal CSS class name is x-grid-row-editor-buttons. But this may cause other problems.
Or, you could try a different editor, such as the CellEditing plugin - this lets you edit one cell at a time, as opposed to showing the editors for the entire row, and doesn't use buttons.
You might be able to remove the button by overriding the Ext.grid.plugin.RowEditing. A quick look at the source shows me an array with in the initEditiorFunction() which looks like this.
btns = ['saveBtnText', 'cancelBtnText', 'errorsText', 'dirtyText'],
Try removing the cancelBtnText button, and perhaps it won't show on there? I haven't tested this but this might be something in the right direction.
I have following text in UILabel. I want to underline both text. and give them click event and open related link.
I Agree to the Terms & Conditions and Hotel Booking and Cancellation Policies
but problem is I couldn't give separate click event for both underlined text.
What is the best way to do that?
I know one option give separate label for all four string. but it is harder to maintain position of all that label for different sizes
Appreciate for help!!!!
take a look of this library Might be it will help you: https://github.com/TTTAttributedLabel/TTTAttributedLabel
Suggest to change the UI design. A possible work around I found is add UILabel below this text label/button with text contains a number of under scores(_) and pin it with auto layout. N.B: It's never ever a good practice at all.
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 know it's a fat chance I'll find an answer here, but since devexpress support is a little slow I thought I'd give it a try.
Basically I'm using DevExpress 2011.1.2 beta, it's been working wonders, I love it. But I had a small issue with it recently...
I inserted an expressbar on the Delphi form and used the images from cxImageList, however, I noticed that the icons on the bar buttons were showing black and white, but when I had my mouse over, it displayed the true colors. I did not modify anything, and yes, the button is enabled.
Here's an image to better illustrate my problem:
I know the solution must be simple, however I couldn't find anything related.
Thank you.
EDIT: After modifying the button's property AutoGreyScale to false the color returned, but dull and lifeless, and when mouse is over it, more colorful.
ImageOptions of my Bar:
Set the button's AutoGrayScale property to False. You may also want to change the value of the global dxBarMakeInactiveImagesDingy variable. The TdxBarManager.Style property may also have an effect.
Also, make sure you haven't set HotImages while leaving Images unassigned.