G
G
gleendo2015-02-23 16:29:25
Delphi
gleendo, 2015-02-23 16:29:25

How to implement such a thing (in the picture)?

What is the component highlighted in red? Should change the number of table rows when changing the value.fed4e3b8d6ef4b76bd092a98c27f8c42.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mercury13, 2015-02-23
@evgeniy8705

A couple of TEdit and TUpDown.

Z
zed, 2015-02-23
@zedxxx

TSpinEdit

A
Andrey Pavlenko, 2017-11-10
@eternalfire

<?php
$x = [
    'А' => '1',
    'B' => '2',
    'C' => '3',
    'D' => '4'
];
$y['A'] = array_shift($x);
$y['B'] = implode('#', $x);
?>

For a more specific answer, specify what exactly you are changing there.
Well, my method changes the x array, if you need an unchanged one - it is desirable to redo the code a little

A
Anton Mashletov, 2017-11-10
@mashletov

$x = [
    'А' => '1',
    'B' => '2',
    'C' => '3',
    'D' => '4'
];

function magic($x)
{
    $k = array_keys($x);
    $v = array_shift($x);
    
    return [$k[0] => $v, $k[1] => implode('#', $x)];
}

print_r(magic($x));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question