Вы хотите программно применить стиль к тексту?
А можно чуть подробнее с кусочком кода который приводит к этому
нет ни какого кода, просто назначьте стиль вашему приложению. Разместите на форме RichEdit и запустите эту форму
My Visual Database → Posts by pavlenko.vladimir.v
Вы хотите программно применить стиль к тексту?
А можно чуть подробнее с кусочком кода который приводит к этому
нет ни какого кода, просто назначьте стиль вашему приложению. Разместите на форме RichEdit и запустите эту форму
А что вы хотите сделать со стилем ?
И в чем ошибка ?
Если приложение использует стили, то использование RichEdit приводит к ошибке
Suggestions:
1 - exchange the TXT control of special brands for RTF, with the user being able to maximize this form or not. RTF, in addition to the various formatting resources, has a native search engine;
2 - if possible, save special marks using MVD's SAVE, which allows you to include quotation marks in the inserted text. The INSERT and UPDATE commands generate an error when there are words in quotation marks in the text that will be saved;
3 - change the Sumatra configuration to save the last reading position, which you already explained how to do in the forum.
RichEdit does not work with styles, there is an error.
If you create the ability to remember a page, then Sumatra creates a lot of unnecessary information, which leads to too much data.
Unfortunately, not all dreams come true (.
Fixed a bug with double quotes
Added the ability to expand the special recording window to full screen
Fixed language file errors
Eliminated TableGrid artifacts that occur when changing the window size.
RichEdit не работает со стилями, имеется ошибка.
Если создать возможность запоминать страницу, то Sumatra создает много лишней информации, что приводит к слишком большому объему данных.
К сожалению не все жилания сбываются (.
Исправил ошибку с двойными ковычками
Добавил возможность развернуть окно специальной записи на весь экран
Исправил ошибки языкового файла
Устранил артефакты TableGrid возникающие при изминении размера окна.
скачать тут https://fileworld.pavlenkovv.ru/BookLib … y.v5.2.zip
It worked the other way around, I tested it but you are right, it looks more logical your way.
Now, I have to find a way to check on the vicious duplicates, the one mixing lower case and uppercase like: HR ..... Hr ..... hr .... hR ...., Human Resources..... human resources .... HUMAN RESOURCES .... those are all duplicates!!!
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
if DupliChk(Form1.Edit1.dbTable,Form1.Edit1.dbField,Form1.Edit1.Text) then
begin //replace object by self-explanatory text
MessageDlg('This object already exists: ' +Form1.Edit1.Text +#13+'Entry cancelled', mtError, mbOk, 0); // Displays a red 'X', header is: Error
Cancel := True;
Form1.Edit1.Clear;
end;
end;
function DupliChk (sTable, sField, sValue: string;): boolean;
begin
if (SQLExecute ('SELECT Count(*) FROM '+sTable+' WHERE upper('+sField+') = upper("' + sValue + '")') = 0) then
result := False else result := True;
end;
Suggestions:
1 - exchange the TXT control of special brands for RTF, with the user being able to maximize this form or not. RTF, in addition to the various formatting resources, has a native search engine;
2 - if possible, save special marks using MVD's SAVE, which allows you to include quotation marks in the inserted text. The INSERT and UPDATE commands generate an error when there are words in quotation marks in the text that will be saved;
3 - change the Sumatra configuration to save the last reading position, which you already explained how to do in the forum.If you can't answer, that's okay: how did you incorporate SCRIPT.DCU into the executable?
I have been using BookLib since the previous version as my default reader. Congratulations on the project.
Thank you, I heard you.
The .pas file is the .dcu file
mvd itself compiles this file when you run the project preview.
Oi Pavlenko, congratulations on the new version, but what is appearing to me (attached floor) is different... File sqlite3.dll is not in the zip.
спасибо, исправил!
thanks, fixed it!
скачать тут https://fileworld.pavlenkovv.ru/BookLib … y.v5.2.zip
I transformed your solution into a function as it is easier when used repeatedly. It works perfectly when using a form that was not called by a "New Record" button.
function DupliChk (sTable, sField, sValue: string;): boolean;
var d: string;
begin
result := False;
d := SQLExecute ('SELECT Count(*) FROM '+sTable+' WHERE '+sField+' = "' + sValue + '"');
if StrToInt(d) > 0 then result := True;
end;
If I understand correctly, then you instantly changed the answer (False)
Do it in this way
function DupliChk (sTable, sField, sValue: string;): boolean;
var d: string;
begin
d := SQLExecute ('SELECT Count(*) FROM '+sTable+' WHERE '+sField+' = "' + sValue + '"');
if StrToInt(d) > 0 then result := True else result := False;
end;
Соответсвует; Не подскажите куда копать?
а Вы пробовали заменить Duble?
например на Extended
Variant or safe array out of bounds
Тип Double является общим типом с плавающей запятой в Delphi. Он подводит баланс между вместимость/точность и память/выполнение.
Он поддерживает приблизительно 15 цифр точности в диапазоне от 2.23 x 10-308 до 1.79 x 10308.
Если соответствует, то проблема в массиве
Переработал связи в БД, реализовал возможность выбора стилей, теперь можно добавить свой языковой файл
Так же изменился способ добавления книг.
Внимание, при использовании БД старой версии не забудьте создать ее копию
скачать тут https://fileworld.pavlenkovv.ru/BookLib … y.v5.2.zip
It actually does not work with the action 'SaveRecord'. I have attached an example of what I am trying to achieve.
I want a very simple way of checking duplicates in a handful of tables in the same way as the example.
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
if (SQLExecute ('SELECT COUNT(id) FROM HardWDType WHERE Kind="'+Form1.Edit1.Text+'"') > 0) then
begin
MessageDlg('This Kind is already in use: ' +Form1.Edit1.Text, mtError, mbOk, 0); // Displays a red 'X', header is: Error
Cancel := True;
end;
end;
I am using Dmitry example up in the post.
Action='SaveRecord' - occurs when saving
This method works only when using a "New Record" button, it does not work with a "Save Record" button.
I tried to add the Action='SaveRecord' but it might be another string sent when using a "Save Record" button:
..[snip]....if (Action = 'NewRecord') or (Action='SaveRecord') then....[snip]....
Does anyone knows what the string sent is?
?????
procedure Form1_TableGrid1_OnChange (Sender: TObject);
var
i:integer;
begin
for i := 0 to Form1.TableGrid1.RowCount-1 do
if Form1.TableGrid1.Cells[1,i] = 'Да' then Form1.TableGrid1.Cell[0,i].Color := $00E3F2F2 else
if Form1.TableGrid1.Cells[1,i] = ' ' then Form1.TableGrid1.Cell[0,i].Color := clGradientActiveCaption;
end;
Видимо все дело в graphics.dll
pavlenko.vladimir.v wrote:dazzleqq wrote:Подскажите, может быть знаете. Как в PHP сделать проверку пароля при авторизации?
тут смотрите
https://pavlenkovv.ru/2022/03/29/%d0%be … %b1%d0%b4/Не смог коммент оставить, пишет, что не все поля заполнены, но я вижу только два поля
Спасибо! исправил.
Могу ли я с вами связи по голосовой связи? через систему Discord
Уже не получиться, поздно, ну да ладно, уже сделали ..
или же просто понять что ему это не надо и просто закроет форму и значение из edita останется не изменым.
в данном коде
procedure frm_add_divace_Button8_OnClick (Sender: TObject; var Cancel: boolean);
begin
if (frm_add_divace.Edit10.Text <> '') then add_up_devace.ComboBox5.ItemIndex := add_up_devace.ComboBox5.Items.IndexOf(frm_add_divace.Edit10.Text);
if (frm_add_divace.Edit11.Text <> '') then add_up_devace.ComboBox6.ItemIndex := add_up_devace.ComboBox6.Items.IndexOf(frm_add_divace.Edit11.Text);
if (frm_add_divace.Edit12.Text <> '') then add_up_devace.ComboBox8.ItemIndex := add_up_devace.ComboBox8.Items.IndexOf(frm_add_divace.Edit12.Text);
end;
говориться о том, что когда Вы в программе открываете окно с комбобоксами, то комбобоксы переключаются на выбранные ранее варианты, так создается возможность не создания, а редактирования ранее созданных записей.
как передать текст из комбобокса в едит Вы уже знаете.
Вопрос :
что за множество условий, что Вы хотите сделать?
Да, это я увидел, но я его перенес с редакцией, но текст так и не перенесся
там не текст переноситься
если edit не пуст, то установить индекс combobox равный индексу записи в листе списка ( запись взять из edit)
если у combobox в списке нет таких записей, то он и не сработает
Попробовал, но не совсем так работает (Он просто стирает TextBox), но нечего страшного, я попробую из верхних примеров собрать что ни будь. Спасибо , если будут идея я не против их попробовать.
Вам нужен был скрипт по маленькой кнопке, а сделал его по большой кнопке с поиском
Подскажите, может быть знаете. Как в PHP сделать проверку пароля при авторизации?
тут смотрите
https://pavlenkovv.ru/2022/03/29/%d0%be … %b1%d0%b4/
if (условие) then действие;
if (условие) then действие else
if (условие) then действие else
if (условие) then действие;
if (условие) then действие else действие ;
if (условие) then
if (условие) then действие else действие ;
if (условие) then
begin
действие;
действие;
end;
if (условие) then
begin
действие;
действие;
end else действие;
if (условие) then
begin
действие;
действие;
end else
begin
действие;
действие;
end;
procedure frm_add_divace_Button8_OnClick (Sender: TObject; var Cancel: boolean);
begin
if (frm_add_divace.Edit10.Text <> '') then add_up_devace.ComboBox5.ItemIndex := add_up_devace.ComboBox5.Items.IndexOf(frm_add_divace.Edit10.Text);
if (frm_add_divace.Edit11.Text <> '') then add_up_devace.ComboBox6.ItemIndex := add_up_devace.ComboBox6.Items.IndexOf(frm_add_divace.Edit11.Text);
if (frm_add_divace.Edit12.Text <> '') then add_up_devace.ComboBox8.ItemIndex := add_up_devace.ComboBox8.Items.IndexOf(frm_add_divace.Edit12.Text);
end;
Всем спасибо, я все понял.
Транзакция либо выполняет все действия единовременно, тем самым гарантирует выполнение всех запросов одним покетом, либо в случае ошибки не выполняет вообще ни каких операций
А вы разве не замечали таблицы ...OLD... в менеджере баз данных?
The old way to rename column
SQLite did not support the ALTER TABLE RENAME COLUMN syntax before version 3.25.0.
If you’re using the SQLite with the version lower than 3.25.0 and could not upgrade, then you should follow these steps to rename a column:
First, start a transaction.
Second, create a new table whose structure is the same as the original one except for the column that you want to rename.
Third, copy data from the original table to the new table.
Fourth, drop the original table.
Fifth, rename the new table to the original table.
Finally, commit the transaction.Можно и не удалять При удалении VACUUM желательно Освободить место.
Отсюда с примером https://www.sqlitetutorial.net/sqlite-rename-column/ В нижней части.
Понял, спасибо!
Транзакция должна создать какой-то временный кеш и использовать его для капирования данных? Если нет, то может в таком случае использовать простое капирование БД?
Я хотел поменять имена нескольких полей SQL запросам
но ват так не вышло
SQLExecute('ALTER TABLE unionSerieToBooks RENAME COLUMN id_series TO id_serie');
Я полез в сеть и наткнулся на пост, в котором утверждалось что изменить имя поля путем запроса можно только начиная с версии SQLite 3.25
Но ведь когда мы работаем с проектом, имена полей меняются.
Помогите сменить имя поля, пожалуйста !
My Visual Database → Posts by pavlenko.vladimir.v
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi