Search for words like in chrome - wpf

this is how Chrome finds you a word when you search for it:
1) select it in all the places it appears.
2) draw little line in the scroll bar wherever it found the searched word.
I have a canvas with scroll view around it, and I want to perform the same thing on it.
I gues that for enabling the selection i'll have to use only richtextboxes ?!? (hope not).
any third party or idea or anything will be highly appreciated

Without looking directly at the Chormium Project (which is open source and available at Chormium Homepage) I would imaging what is happening on this particular example is something following these steps:
Word Highlighting
Search the page source/content for the keyword using a simple regex
Insert that text into some form of a HTML container (either a span or a div) with a particular id
Use CSS to style that container to indicated the highlighting
Sidebar Highlighting
Use some algorithmic method to vertical position of the highlighted term
Add a indicator to the side bar in a some presentation layer/control that is transparent and below the scroll bar
It may be possible that there exists a 3rd party control that does these things, or it may be possible to leverage your work off of the existing work in the chromium project. However it is most likely not done using a RichTextBoxes nor simple text selection.

Related

Sublime Text 3 find and replace in multiple files

I want to find and replace code in multiple files.
Does anyone know if the feature "find and replace in multiple files" in Sublime Text 3 is gone?
It used to be a feature for ST2 (shift-command-F), see screenshots ST2 and ST3.
Or is there a other way to do this?
The option is still there, but because you're using a custom theme the bar needs to be taller for you to see the entire contents of the panel.
You can grab the top of the panel and stretch it up so that everything is visible and then back down as far as it will go to make it compact again.
You only have to do this once; Sublime remembers the height of the panel and will use it next time (which is why it uses the incorrect height when you switch to a theme that makes everything in the panel taller).

codename one List scroll to the selected item

I want to display a list of names on the screen and a vertical alphabet scroll bar on the right side of it...similar to the contact list application in Android.
So when I click a letter from alphabet scroll bar, all the names starting with that letter should appear at the top of the screen.
List of names
That is what fixed lead section mode does. It fixes the selection in one place so the rest of the list moves around it. This is quite common in non-touch UI's for mobile phones but not so much for newer devices so this feature isn't mentioned in the developer guide or used anywhere in our samples...
Furthermore, please notice that we no longer recommend using List as explained in the section covering it in the developer guide. It's an advanced and complex component that won't deliver advantages for most common use cases.

AngularJS Dynamic Slider Control

I am working on a project that requires a slider control that corresponds to an image and or a multitude of div objects. The spacing of the slider is irregular (the steps could be [1,4,7,13,14,16...]). Also the steps will correspond to specific spots on an image and or to a specific div object. The perfect slider would be dynamic and re-size with the screen but that may be actually impossible.
The hard part is that I am unable to use JQueryUI, instead I am limited to using controls that work with AngularJS.
I have been looking for hours and cannot find anything that would be a good starting point. So my question is whether anyone has found a good slider control to use with AngularJS?
This one fits some of your criteria
angularjs-slider

How do you design an image for Codename One TouchCommand?

I am 2 days in experimenting with Codename One and Mobile development in general and tested out some basic navigation and features so far. Now I want to work on the look and feel of the app.
I looked at the 9-border vid which was helpful, but not sure of the best way to add an image for the touchCommand that takes 3 tabs on that bar ( Example: home, profile, settings.. Similar to how instagram's TouchCommand is at the bottom of the app).
If I add the image, it does not line up with my Commands.
What is the best way to approach this to ensure the "TouchCommand" image appears as one, but is broken up to 3 parts for each individual commands when pressed, home, profile and settings? I might be asking this all wrong, forgive me as this is all new to me.
Thanks.
EDIT:
This is what was done.
In Theme -> Constants added commandBehavior= bar . This gives the default bar at the bottom. Created in photoshop a new bar 300x80 and added it to the TouchCommand. (See ScreenShot 1). Took this bar and broke it up in photoshop into 3 different buttons for the tab press etc. In GUI Builder, added Home, Profile, Settings in the commands. Added the image to Press Icon for Home and it didnt line up (screenshot 2). Very Frustrating to design layouts. I am hoping there is a much better technique as I am still experimenting with Codename one?
What is unclear to me, is I cant find any documentation on how to approach this and what the dimensions of each image should be as it seems that codename one has issue aligning them. I am assuming the steps would be to create the background image and add the icons as interactive layers for the user. I really care for the image being pressed and changes color like the instagram example. I dont see a way to do this in codename one GUI builder and themes.
EDIT:
Okay, I have decided to use tabs instead of the bar at the bottom. If I add my image to it, I get the results (screeshot 3). Is this the right method to use to accompolish what I want? If so, I dont see a way yet to alter this to become what I want :( .
Plus adding the background, shows one size in the display and looks different in the simulator. (screeshot4)
Answered Here: How do you get ActionBar from SocialBoo theme to show up in your GUI?
Tabs are customized individually so the border should apply for an individual tab to create the background. The foreground element is the icon which you define in the Tabs component itself thru the icons property which allows you to define 3 icons for the 3 tabs (assuming you use the GUI builder). If you add the tabs via addTab in the code you can specify an icon there.

Vertical column cursor highlighting in text editor?

I'm looking for a basic text editor or a plugin for an existing editor that can highlight the entire current column or vertical location of the cursor similar to the common option to highlight the entire currently selected row or line.
I think it would be very useful for indented code.
Does anyone know where I can find something like this?
I understand exactly what you're looking for and want it myself. I use Notepad++ (based on Scintilla) but there doesn't seem to be a "highlight current column" option the way they do provide for "highlight current line".
I looked at the plugin architecture and demo plugin package. I whipped up a proof of concept - very basic, surely buggy, that uses the long lines edge column indicator as the "highlight" for current cursor column. Not the best solution since if you're using the edge indicator, you "lose" it.
Source code on GitHub:
https://github.com/vinsworldcom/nppColHighlight
Notepad++
It's based on the Scintilla library which implements exactly that feature you're describing, basically highlighting a rectangular area.
To do so, hold Alt + Left Mouse or Alt + Shift + Arrow Keys to select.
If you still haven't found such an editor, PSPad editor has the feature.
Link: https://www.pspad.com/
Please see the attached screenshot (don't worry about the editor language in my screenshot, English (and several other languages) are also available).
PSPad editor with vertical line showing the current cursor position

Resources