Questions tagged [selection]

The selection can refer to text that has been highlighted, or it can refer to a choice made in UI elements that require one, e.g. a particular option in an HTML `select`. Selection is also the stage of a genetic algorithm in which individual genomes are chosen from a population for later breeding.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to handle multiple selection of html elements with document.getSelection() like tiny-mce editor

I want to handle multiple selection of html elements with the help of document.getSelection()?
annonymous2345's user avatar
0 votes
0 answers
15 views

How to get the selection of multiple html elements with document.getSelection()

const nodes = Array.from(range.commonAncestorContainer.children); const cloneNodes = Array.from(range.cloneContents().children); const selectedNodes = nodes.filter((node: any) => cloneNodes.some((...
annonymous2345's user avatar
0 votes
1 answer
34 views

Selection of multiple html elements with the help of document.getSelection()

How to iterate through the multiple selected html elements. const selection = window.getSelection(); const selectedElements = selection.getRangeAt(0).cloneContents().querySelectorAll("*"); ...
annonymous2345's user avatar
0 votes
0 answers
16 views

How to select HTML elements with document.getSelection() in JavaScript,

let selection =document.getSelection(); let cloned = selection.getRangeAt(0); for(let i =0; i <selection.rangeCount; i++) { cloned.append(selection.getRangeAt(i).cloneContents());} Whenever, I ...
annonymous2345's user avatar
0 votes
0 answers
11 views

Visual Studio: Disable quote wrapping text selection

When I select a block of text, I and I type a " or a < sign etc. I would like it to simply replace that selected text with the key I press, rather than the new behavior of wrapping the ...
Joe's user avatar
  • 2,008
-1 votes
0 answers
47 views

Text selection doesn't show until input looses focus in Firefox (javascript)

The code below seems to work as expected in most browsers but not Firefox. The following code is stripped to basics, I've tried this in Chrome, Opera & Edge, all fine. But in Firefox it behaves ...
Terry King's user avatar
0 votes
0 answers
34 views

Select a dynamic Range in Excel VBA

I need to select and delete different ranges that is produced inside a loop. Everytime it changes size and location! Sub DelDoublicate() ' some selection of a bigger range happens here. whole data ...
2012User's user avatar
  • 123
-1 votes
0 answers
38 views

Stack smashing detected in C++ Selection Sort implementation: Unexpected output and array corruption [duplicate]

I am new to C++ (Have learned Python before), I am a student and got an assignment to implement SELECTION SORT in C++. I tried it recursively and this is the Code: #include <iostream> using ...
Aditya Kumar Junwal's user avatar
-1 votes
0 answers
14 views

python and not able to structure mind on the problem statement [closed]

i dont know why its so hard to find this correctly but its a while loop some how!??!?! And what about this problem statement let’s say I need to write a program for a bank to withdraw stuff from a ...
Omar H's user avatar
  • 7
0 votes
0 answers
11 views

Edge Addition: Item subset selection problem (Knapsack?)

I have a set of n edges, e-star, which is the set of valid possible extra edges to an existing graph, G(v,e). I want to minimise the median route path length across the network from a central point, c,...
sploopst's user avatar
0 votes
0 answers
40 views

Maps not updating in MacOS (and iOS)

I have a sample project where you select a location from the sidebar and the location will be displayed on the map. You can select any location and the map will update. But as soon as you move the map ...
diver91's user avatar
  • 27
0 votes
0 answers
12 views

Selection Sort (Sorting Nodes not Values) in Double Linkedlist

I am trying to sort a double linkedlist, its node class is Weapon. I already tried the swap method for bubble sort and shell sort, it works fine. I don't know what part is incorrect in this selection ...
Chingu Dev's user avatar
0 votes
2 answers
105 views

Delphi: de-focus TDateTimePicker control

I have the following problems with the TDateTimePicker control: When the form comes up, it's automatically focused. It's my first control on the form, but everything needs to be de-focused on startup....
gene b.'s user avatar
  • 10.9k
-1 votes
0 answers
51 views

PLONE 4.3.18 transition to ssl enabled site creates problems with internal document/image selection in a page dexterity type

PLONE 4.3.18 transition to ssl enabled site creates problems with internal document/image selection in a page dexterity type. Hi, I have a multilingual site zelem.org.il in Plone 4.3.8 and wish to ...
Michael  P's user avatar
1 vote
1 answer
53 views

Is there an R function that I can force two variables always to be added or removed together?

I have been using stepAIC in the MASS package to perform model selection. I would like two independent variables in the model always to be added or removed together in the stepwise selection (both ...
Michael's user avatar
  • 23
-1 votes
1 answer
40 views

laravel update the selected value immediately and pass to the backend

hi I am working on a laravel project, I wanna have a selection, and the selected value updates and pass to the backend immediately once I choose a option value in the selection. here is my markup: <...
RA.IBOY's user avatar
  • 99
-1 votes
1 answer
50 views

laravel how to update the selected value from selection immediately

I am working on a laravel project, I wanna create a selection that the selected value updated immediately when I click the selection, here is the markup: <select name="survey_option", ...
RA.IBOY's user avatar
  • 99
0 votes
2 answers
87 views

selection on editable div doesn't work if an Enter is typed

I have an editable div and multiple blocks of texts between a starting three backticks and ending three backticks markers Let's say the cursor is anywhere between the markers Clicking on a button I ...
provance's user avatar
  • 897
0 votes
0 answers
26 views

Beeware Toga Selection widget: unable to change text size

In my Beeware app I am trying to use the Selection widget according to https://toga.readthedocs.io/en/latest/reference/api/widgets/selection.html setting the value of the the font_size parameter. To ...
Ariel's user avatar
  • 61
0 votes
0 answers
8 views

Crystal Reports: Hour based selection criteria won't cross midnight

I've got a formula I've used dozens of times with consistent success that suddenly isn't working and I'm baffled. I'm trying to generate data for a 24 hour period. I've done this several times in the ...
Mark Edmondson's user avatar
0 votes
0 answers
34 views

Hover color for entire row of the tree

I have a swt tree for which I have added SWT.EraseItem listener in order to get the selection, hover color for tree items. The selection, hover colors are appearing properly but that color is getting ...
Satya's user avatar
  • 9
0 votes
2 answers
47 views

Error in implementing selection sort in JavaScript

This code is to implement selection sort in JavaScript. I tried with the array [3,2,1] but it return [1,1,1]; the array [4,5,1,2,7] return [1,1,1,2,7]. I don't know where I went wrong. Please help! ...
Linh Chi's user avatar
1 vote
0 answers
18 views

Flutter multiple drop-down issues

I have made an data table in which I have made an drop-down which is in every row so when I'm switching the value of drop-down in one drop-down then all the drop-downs value is getting changed so I ...
Tushar Khardikar's user avatar
0 votes
1 answer
46 views

Issue with highlighting the selected row in angular

i have designed a custom grid and i want to highlight the row on selection but it is not working. I am not able to figure this out why this is happening. Below is the part of custom grid where for i ...
Kshitij Chaudhary's user avatar
1 vote
1 answer
36 views

I want to count in R how many rows I have that have no 0 value at all

I have a data set with 5908 rows (now the variables) and 5 columns (observations). The variables take the value 0.00 in some column. I want to sort out the rows that do not have any zero values at all....
Mátyás Bukva's user avatar
1 vote
1 answer
52 views

Why does selectRange() in JavaFX TextArea sometimes not highlight the selection?

I have written the following code in my JavaFX main class: package jfxTest; import java.util.Random; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control....
nick16384's user avatar
1 vote
0 answers
47 views

Using images as emojis in a contenteditable div used as a chat input

I have a little chat feature I am working on and I am using images as emojis. What I did was, when an emoji is clicked two elements are created, the first is a span with the background image of the ...
redd's user avatar
  • 43
0 votes
0 answers
50 views

primeng Table stop unselect when row is expanded

I am using primeng Table and this is my p-table <p-table #tableDrag [id]="'tblFieldsTab'" [value]="fieldsData" [lazy]="true" [...
nikhil arya's user avatar
0 votes
0 answers
9 views

Set command in Range for every Cell

I have code duplicated Active Cell which I select, but I need a correction that allow me duplicate every Cell in Range which I will select. ActiveCell.EntireRow.Copy Range(Selection.Offset(1, 0), ...
Atko's user avatar
  • 1
0 votes
1 answer
79 views

How to get the start and end position of selected text from Python Tkinter Text widget

I want to get the start and end position of selected text in a Tkinter Text widget. If no text is selected, it should use the position of the cursor for both start and end positions. It also appears ...
Daniel Louw's user avatar
-3 votes
1 answer
35 views

Is there anything special about a list box on a page control? [closed]

I don’t understand why my click event isn’t running when I select a row in a listbox. I have a userform in Excel, and it contains a page control. I’ve added two pages to the control. I have a listbox, ...
chuckbo's user avatar
1 vote
1 answer
63 views

w2ui grid: disable single row selection

I have a w2ui grid with multiSelect enabled. My goal is to disable selection of certain rows and keep available selection of others. let grid = new w2grid({ name: 'grid', box: '#grid', ...
Stefano Radaelli's user avatar
0 votes
1 answer
30 views

Get selected from Listbox tkinter

I have created a Listbox that appear when a button is clicked. import pandas as pd from tkinter import* import tkinter as tk window = tk.Tk() window.geometry("100x100") def test_listbox(): ...
Basilico's user avatar
0 votes
2 answers
50 views

How to remove spans from selected text of a contentEditable <div> with Javascript?

I try code in order users to be able to remove spans from a selection of a contentEditable . The code works, but removes all spans from entire body and not only from the selection, as I want. Here is ...
Iraklis Kreventzakis's user avatar
1 vote
1 answer
41 views

wpf change listview selection color and remove white

I tried multiple times to remove that kind of white glossy effect in wpf, But even when changing everything to #1F419A I still have that white thing. Top of the selection white Is there a way to fix ...
Lucas Dewil's user avatar
0 votes
0 answers
35 views

In Javascript how do I initiate and draw a selection box on a <div> element for floating elements inside?

In a pure Javascript project which uses a full-sized <div> element containing floating other <div> elements, I want to be able to select elements using both a mousedown-activated selection-...
frans's user avatar
  • 9,108
0 votes
0 answers
44 views

Tinymce get start and end index of selection taking html characters into account

I am actually trying to find a way to gather the start and end indexes of the selection object of tinymce. The reason why I want that is that i want to take the selection when a button is clicked, ...
MRC's user avatar
  • 1
1 vote
0 answers
134 views

Can I bind the selection in a SwiftUI Table to Item instead of Item.ID?

I have a SwiftUI Table whose rows are populated by FetchedResults. To be able to trigger a detail pane view to show the item of the selected table row I want to map the table selection to an enum in a ...
Stefan's user avatar
  • 1,061
0 votes
0 answers
16 views

How to extract selected text from inside multiple nested spans to plain text while preserving the spans

I'm trying to make an inline tool for EditorJS that will clear any formatting on the selected text applied via spans. The issue I'm having is that the tool should clear the formatting only on the ...
Michal Habel's user avatar
0 votes
1 answer
62 views

When you have an igx-grid that is paginated, how can you navigate to a row on a different page than the one you are on?

I have the code to navigate to a specific row based on the primary key index: public scrollToRow(index: number){ let row = this.grid.getRowByKey(index); if(index != null || this.grid != null ){...
Ted Herrlich's user avatar
0 votes
0 answers
94 views

Is there a way to get a printout of specific selected lines of code in visual studio 2022 in windows 11?

I have currently in visual studio version 17.6.4 and windows Version-10.0.22621 Build 22621. I am trying to get a printOut of selected lines of code. But there is no print preview and if I try to ...
Rubayat26's user avatar
1 vote
1 answer
43 views

IVtkTools_ShapePicker doesn't pick anything

Hi everyone, I use Qt5, Opencascade 7.7.0 and VTK 9.2.6 on windows. I want to load and display a step file and then being able to clic and select part of the loaded object. I have already coded the ...
Zelie R's user avatar
  • 11
0 votes
0 answers
14 views

How to keep selection of window.getSeleciton() when click input

I'm write with vue3 source code but I cannot handle input remove selection text when click it Image description source code I'm try with mousedown.prevent but input not working I'm try with ...
Lưu Công Quang Vũ's user avatar
0 votes
0 answers
27 views

Identified selected ranges in Google Sheets using API

I would like to use the Google Sheets API, and NOT Google Apps Script, to identify which ranges a user has selected in a Google spreadsheet. Is there a reasonable way to do this? Or do I need to use ...
MDunninger's user avatar
0 votes
0 answers
48 views

SectionedFetchedRequest object selection in SwiftUI

With this code I save a selected Student from a list generated from FetchRequest: @FetchRequest var studentsFetchRequest: FetchedResults<Student> @State private var selectedStudent: Student? ...
arroyot24's user avatar
0 votes
1 answer
37 views

how to make an element unselectable but able to start selection from it

I want to make some <span>s in a <pre> element unselectable, but if I use the CSS property user-select: none, I won't be able to start selection from these <span>s (click at these ...
FaniX's user avatar
  • 91
0 votes
1 answer
41 views

How to select entire current line inside a div?

$('button').on('click', function(){ let selection = window.getSelection(); var ch; while(ch !== "\n"){ selection?.modify('extend', 'backward', 'character'); ch = selection....
provance's user avatar
  • 897
1 vote
0 answers
43 views

Why my Paste event does not work on few sites?

I am trying to programmatically insert strings into text fields. I tried document.execCommand("insertText", false, wordToInsert); But it does not work on few sites which are using draft.js ...
SkyRar's user avatar
  • 1,137
0 votes
0 answers
22 views

Our macro with changing "," into "." - not working for dots

I tried to register simply macro. It should delete the spaces in data visible in columns A:D and also should replace "," with ".". Data in columns A:D is copied and pasted from ...
DamianD's user avatar
  • 43
2 votes
1 answer
88 views

How to modify selection to the previous and next space or new line

$('button').on('click', function(){ const selection = window.getSelection(); selection?.modify('move', 'backward', 'word'); selection?.modify('extend', 'forward', 'word'); console.log(selection....
provance's user avatar
  • 897

1
2 3 4 5
81