Перейти к содержанию
Fire Monkey от А до Я

Brovin Yaroslav

Администраторы
  • Постов

    2 124
  • Зарегистрирован

  • Посещение

  • Победитель дней

    390

Активность репутации

  1. Like
    Brovin Yaroslav отреагировална ENERGY в TImage и MouseLeave   
    Ctrl + F: Ищем слово Leave  в исходниках Timage - нету. Смотрим в родителе - TControl - есть. 
    Жмем Ctrl + Space в вашем классе. Пишем Do и выбираем DoMouseLeave.
    protected
      procedure DoMouseLeave; override;
    Не забудьте inherited; добавить. 
  2. Like
    Brovin Yaroslav отреагировална Barbanel в Как убрать черту под TSpinBox?   
    Не изменятся, потому что для другого разрешения границы могут иметь другой размер, соотв. IDE не может сообразить куда нужно двигать и нужно ли менять размер.
    Имхо, лучше так как сейчас, чем если бы она сама пыталась подвинуть все элементы.
  3. Like
    Brovin Yaroslav отреагировална Barbanel в Как убрать черту под TSpinBox?   
    Возможно на устройстве (даже не возможно, а с уверенностью 99.9%) используется масштабирование большее чем 1.0
    Скорее всего вы исправили регионы только для масштабирования 1.0 а нужно исправить для всех коэффициентов.
    Идете в редактор стилей, выбираете свой компонент, жмете на Links (TBitmapLinks что там у этого компонента), в окне LinksEditor слева в нижней части будет список Resolutions.
    Пробегаетесь по ним всем и корректируете местоположение.
    И будет вам счастье ?
  4. Like
    Brovin Yaroslav отреагировална Barbanel в Как убрать черту под TSpinBox?   
    Скорее всего это в объекте Background.
    Найтиде свойство SourceLinks, откройте и посмотрите на какую часть изображения ссылается фон.
    Возможно там что-то сдвинулось, или такая задумка дизайнеров.
  5. Like
    Brovin Yaroslav отреагировална IVGSoft в Производительность отрисовки текста на мобильных платформах   
    А выглядит это как-то так :
     

  6. Like
    Brovin Yaroslav отреагировална IVGSoft в Производительность отрисовки текста на мобильных платформах   
    Сообщения чата представлены вот таким интерфейсом
     
  7. Like
    Brovin Yaroslav получил реакцию от Ingalime в BVS Solitaire Collections is Embarcadero Cool App Winner for May   
    Anyone who loves playing with deck of cards knows solitaire. And no matter how advanced the technology is, it will always be played. That is why I’m thrilled to see BVS Solitaire Collection by BVS Development as our May 2018 cool app winner. It is an award-winning multi-featured collection of solitaire card games that includes over 510 variations.
    It features both old-time favorites (like Spider Solitaire, FreeCell and Pyramid) and original variations not found elsewhere. You can modify rules of any game, thus easily creating your own unique variations. Attractive smoothly scalable playing cards, completely customizable game appearance and comprehensive set of statistics to measure your performance. Its Windows version gained popularity and was even featured in a movie "The Girl with the Dragon Tattoo" (2011).

       
    BVS Solitaire Collection is built with Delphi along with Firemonkey. It runs on iOS, MacOS and Windows. Boris of BVS Development Corporation shared his experience on Delphi, he said: 
    "Delphi was chosen due to the flexibility of Object Pascal and both powerful and convenient development environment. I like the aesthetics of the Object Pascal code and its high readability. When I'm in an edit-compile- debug cycle I want it to be as fast as possible. Delphi compiler is extremely quick. That accelerates my development efforts and greatly improve my productivity. Besides, Object Pascal is much simpler and safer than C++ which further improves productivity and code maintainability. Embarcadero keeps adding new features continuously. Actually Delphi is one of the best IDEs on the market, that can be used to create cross platform applications."
     
    Watch BVS Solitaire Collections video in action here: 
     
    Interested in submitting for the Embarcadero’s Cool App contest? It’s open to any business or consumer application built with RAD Studio, Delphi or C++Builder. Embarcadero awards Cool App contest winners a $500 Amazon gift card and winning submissions are also highlighted on the company’s YouTube channel. For more information on the contest and a link to the submission form, click here.
    Просмотр полной статьи
  8. Like
    Brovin Yaroslav получил реакцию от Ingalime в C++’s Strengths Keep it Relevant in an Age of Code Bootcamps   
    There is an interesting post on Medium aiming to inspire students why to learn C++. Its main point is that learning C++ teaches fundamental computer science concepts: memory management, compile-time vs run-time, polymorphism implementation, iterators and containers, and more.  Unfortunately, it phrases itself in an exclusionary manner. While C++ is not the only language where you can learn these fundamentals, it is one of the most popular.
    However, with dozens of coding "boot camps" popping up and charging thousands of dollars for the promise of a quick path to a software development career, why should you consider learning a complex language like C++?
    Here are three key reasons to learn and use C++ today:
     
    Technical Foundation It's Widely Used Support and Future  
    Let’s look at these in order.
    Technical Foundation
    C++ is one of the most common languages used to teach strong foundational knowledge that is applicable to all other languages. There are many core concepts you can learn with C++:
    Memory management: Allocating and freeing; use of pointers, and very quickly why you should not manually manage memory Different memory management models: reference-counted in the form of shared_ptr; strict ownership in the form of unique_ptr 
    Ownership and deterministic behaviour, illustrated by RAII (see C++ specifics)
    Polymorphism behaviours: this one is in fact illustrated by some odd behaviours of C++, such as that the type identity of an object changes throughout its construction - hint, what happens when you call a virtual method in a constructor?
    Fundamental containers and algorithms
    Optimizations: what causes fast or slow code?
    Functional programming: while not a pure functional language, functional style is a direction the language has been heading and is very powerful in C++
     
    If you learn C++, you will have a solid background that will allow you to understand other languages’ designs and implementations.
    It’s Widely Used
    C++ is the most widely used language for software today, especially in areas requiring performance. The following applications are written totally or mostly in C++:
    Windows Explorer
    Photoshop
    Word
    Clang compiler
    Windows (key area, including the new wrappers for XAML and desktop in C++17)
    Amazon’s key services
    Large parts of Apple’s macOS
    Bloomberg’s financial software
    And many more.
    Why is it widely used?
    Because C++ is powerful, expressive, concise, and performant. When you need to write solid, fast, applications and need powerful concepts in your code, you use C++.
    Support and the Future
    Finally, one key item in learning a language is the direction it’s going in the future. C++ is an ISO standard, and is evolving rapidly. You can read an overview of the various standard versions here.
    It’s a language that is being kept up-to-date and extended as developers need it. That’s a language to rely on.
     
    Ready to Get Started learning or expanding your C++ knowledge? Start with our free tools and C++ Bootcamp replays.
     
    Просмотр полной статьи
  9. Like
    Brovin Yaroslav отреагировална GASCHE в Конвертация HString в string   
    Вроде тут System.Win.WinRT.pas есть.
  10. Like
    Brovin Yaroslav отреагировална Maximus в Картинку с вебки зеркально отобразить   
    Не подойдёт? http://docwiki.embarcadero.com/Libraries/Berlin/en/FMX.Graphics.TBitmap.FlipHorizontal
  11. Like
    Brovin Yaroslav отреагировална Alex7wrt в Не выбирается цвет кнопки   
    Кидаете на форму панель, нажимаете на нее правой кнопкой - > Edit Custom Style - > И там в стиле меняете свойство Fill
  12. Like
    Brovin Yaroslav отреагировална Alex7wrt в Не выбирается цвет кнопки   
    Если нужно менять цвет, то выбирайте TRectangle, как выше писали. Он полностью заменяет TPanel + имеет много возможностей по оформлению заливки и рамки, даже углы можно закруглить и т.п.
  13. Like
    Brovin Yaroslav отреагировална Sergiy_83 в Вывод личных сообщений   
    Мы с вами в одном окопе. Путь к ListView лежит через ListBox. т.e надо помучится с listbox что бы понять что без ListView не обойтись. 
    В чате как правило картинка и текст возможно не один. 

    Создайте в ListView в режиме dinamicAppearance свои поля со своими именами, Далее ПКМ по listView выбираете TogleDesignMode там двигаете свои добавленные поля как вам удобно. 
    Далее смотрите код. Чем смог тем помог!
    //Добавить итем в список void __fastcall TTabbedForm::add_item(int num_ico,UnicodeString *fname, UnicodeString *ext_name, unsigned int color)     {     TListItemText  *ext;     TListItemImage  *ico;     TListViewItem* item = ListView1->Items->Add();     item->Height = 30;     ext = dynamic_cast<TListItemText*>(item->Objects->FindDrawable("extenssion_text"));     if (ext)         {         ext->PlaceOffset->X = ListView1->Width -  60;         ext->Text = *ext_name;         ext->TextColor = color;         }     ext = dynamic_cast<TListItemText*>(item->Objects->FindDrawable("file_name_text"));     if (ext)         {         ext->Text = *fname;         ext->TextColor = color;         if (num_ico==0)    ext->Width = ListView1->Width - 10;   //длина до расширения.         else            ext->Width = ListView1->Width - 90;   //длина до расширения.         }     ico = dynamic_cast<TListItemImage*>(item->Objects->FindDrawable("Icon_Image"));     if (ico)         {         switch (num_ico)             {             case 0: ico->Bitmap = Image_64x64_ret->Bitmap;         break;             case 1: ico->Bitmap = Image_64x64_folder->Bitmap;     break;             case 2:    ico->Bitmap = Image_48x48_spk->Bitmap;         break;             case 3: ico->Bitmap = Image_64x64_play->Bitmap;     break;             case 4: ico->Bitmap = Image_64x64_pause->Bitmap;     break;             default:  break;             }         }     }  
  14. Thanks
    Brovin Yaroslav получил реакцию от Мирзали Пирмагомедов в Как я могу скрыть / показать клавиатуру под "Android"?   
    Русский
    За управление виртуальной клавиатурой в FireMonkey отвечает сервис IFMXVirtualKeyboardService (Embarcadero Doc Wiki). Который позволяет отображать и скрывать клавиатуру.
    Для скрытия клавиатуры достаточно выполнить следующий код:
    uses FMX.Platform, FMX.VirtualKeyboard; procedure TForm5.ButtonHideKeybordClick(Sender: TObject); var KeyboardService: IFMXVirtualKeyboardService; begin // Запрашиваем сервис виртуальной клавиатуры if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(KeyboardService)) then KeyboardService.HideVirtualKeyboard; end; Чтобы показать клавиатуру для контрола:
    procedure TForm5.ButtonShowKeyboardClick(Sender: TObject); var KeyboardService: IFMXVirtualKeyboardService; begin // Запрашиваем сервис виртуальной клавиатуры if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(KeyboardService)) then KeyboardService.ShowVirtualKeyboard(Edit1); end;

    English 
    FireMonkey has special service for managing Virtual Keyboard. It is IFMXVirtualKeyboardService (Embarcadero Doc Wiki). It allows show and hide keyboard.
    For showing virtual keyboard use next code: uses FMX.Platform, FMX.VirtualKeyboard; procedure TForm5.ButtonHideKeybordClick(Sender: TObject); var KeyboardService: IFMXVirtualKeyboardService; begin // Request service of visrtual keyboard if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(KeyboardService)) then KeyboardService.HideVirtualKeyboard; end; For showing virtual keyboard for control:
    procedure TForm5.ButtonShowKeyboardClick(Sender: TObject); var KeyboardService: IFMXVirtualKeyboardService; begin // Request service of visrtual keyboard if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, IInterface(KeyboardService)) then KeyboardService.ShowVirtualKeyboard(Edit1); end;
  15. Like
    Brovin Yaroslav получил реакцию от Ingalime в BriskBard Named as Embarcadero's Cool App Winner for April   
    I was really excited to see BriskBard by Salvador Díaz Fau as the April 2018 winner of the Cool App Contest. BriskBard is a browser, and a whole lot more. All the other browsers out there are just browsers, while BriskBards is a web browser for Windows that includes an email client, a media player, a news aggregator, a contact manager, an FTP client, a usenet newsreader, an IRC client, and several web developer tools. Did I mention it is also free? Think of it as your one stop shop for all your internet related tools.
    BriskBard is built with Delphi 10.2 Tokyo along with Indy, Hunspell, OpenSSL, SQLite, and three HTML rendering engines. It includes both Blink (used by Chromium), Trident (used by Internet Explorer) and it’s own custom rendering engine. To take advantage of Blink/Chromium Salvador created the CEF4Delphi open source project which makes it easy for Delphi developers to use DCEF3 (made by Henri Gourvest).
    When talking to Salvador about his use of Delphi in BriskBard he said:
    You can see a video overview of BriskBard on YouTube:
    [YoutubeButton url='https://www.youtube.com/watch?v=KPwvaMlJE3A’]  
    Interested in submitting for the Embarcadero’s Cool App contest? It’s open to any business or consumer application built with RAD Studio, Delphi or C++Builder. Embarcadero awards Cool App contest winners a $500 Amazon gift card and winning submissions are also highlighted on the company’s YouTube channel. For more information on the contest and a link to the submission form, click here.
    Просмотр полной статьи
  16. Like
    Brovin Yaroslav получил реакцию от Savage в Как закрыть форму на мобильной платформе?   
    Чтобы закрыть форму с выгрузкой ее из памяти, нужно сделать следующее:
    Повесить обработчик на событие формы TForm.OnClose. Установить переданные параметр Action в TCloseAction.caFree procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Action := TCloseAction.caFree; end; Doc Wiki: Releasing Forms in iOS Apps
  17. Like
    Brovin Yaroslav получил реакцию от Вадим Шавров в Где взять стандартный стиль в FireMonkey для iOS и Android, используемый по умолчанию?   
    Хороший вопрос.
     
    Не все знают, что в RAD Studio XE5 входит дизайнер растровых стилей для VCL (BitmapStyleDesigner), который также позволяет автоматически создавать стили для FireMonkey. Этот дизайнер находится в папке Bin/bitmapStyleDesigner.exe и содержит внутри себя автоматическую конвертацию любого VCL стиля в FireMonkey. 

    Этот дизайнер также предназначен для внесения правок в стандартные системные стили андроида и йос.
     
    Чтобы получить системный стиль Android Dark, Android Light, iOS, iOS 7 нужно:
     
    1. Выбрать дефолтный требуемый стиль: 

    2. Сохранить стиль как стиль FireMonkey:

     
    А дальше использовать файл стиля в своих приложениях.
  18. Like
    Brovin Yaroslav отреагировална Евгений Корепов в Обработка анимированных GIF по рецепту китайского коллеги   
    Принцип работы такой:
    На форму кладете стандартный TImage Создаете экземпляр TGifPlayer Задаете свойство FGifPlayer.Image:=Image; где Image это лежащая на форме TImage Загружаете гифку FGifPlayer.LoadFromFile('D:\Embarcadero\Projects\ShareCode\FMX.GifUtils\GIF_Example.gif'); Запускаем проигрывание гифки FGifPlayer.Play; Вот код:
    unit UnitFormMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.GifUtils, FMX.Objects; type TFormMain = class(TForm) Image: TImage; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } FGifPlayer : TGifPlayer; end; var FormMain: TFormMain; implementation {$R *.fmx} procedure TFormMain.FormCreate(Sender: TObject); begin FGifPlayer:=TGifPlayer.Create(Self); FGifPlayer.Image:=Image; FGifPlayer.LoadFromFile('D:\Embarcadero\Projects\ShareCode\FMX.GifUtils\GIF_Example.gif'); FGifPlayer.Play; end; end. Вот демо проект во вложении:
     
    FMX.GifUtils.Demo.zip
  19. Like
    Brovin Yaroslav получил реакцию от dnekrasov в Обрезается размер у Form   
    В токио 10.2.3 была пофикшена проблема с неверным вычислением скейла при использовании системного увеличения приложений.
  20. Like
    Brovin Yaroslav получил реакцию от pill в Собственный TListBoxItem на C++   
    При применении стиль всегда растягивается по размеру контрола, а не наоборот. Если вы хотите, чтобы у вас всегда был фиксированный размер, то в стиле используйте FixedWidth, FixedHeight.
    Если вы не хотите фиксировать размер итема, а лишь задать дефолтный размер, то переопределите в классе итема метод GetDefaultSize, в котором верните желаемый размер.
  21. Like
    Brovin Yaroslav получил реакцию от Anatoliy в Обрезается размер у Form   
    В токио 10.2.3 была пофикшена проблема с неверным вычислением скейла при использовании системного увеличения приложений.
  22. Like
    Brovin Yaroslav получил реакцию от Barbanel в Tokyo 10.2 Не работает дебаг в Android   
    Физически, при старте приложения с дебагом, среда посылает на ваше устройство интент на запуск приложения. В интенте передается порт для отладчика, по которому среда будет взаимодействовать с дебаггером.
    Система, получив интент:
    Стартует приложение Приложение при старте получает порт и пытается поднять gdb сервис отладки на указанном порту. Соответственно, если порт уже занят, то вы получите эту ошибку. Он может быть занят в результате предыдущей отладки делфи приложения, которое не было завершено, что заставляет Андроид удерживать нужный среде порт. Помогает обычно:
    Полный ребут девайса, который гарантирует, что никакой ваш процесс у вас не повис. Удаление из процессов винды android_gdb. Который так же может удерживать нужный вам порт.
  23. Like
    Brovin Yaroslav получил реакцию от Евгений Корепов в Tokyo 10.2 Не работает дебаг в Android   
    Физически, при старте приложения с дебагом, среда посылает на ваше устройство интент на запуск приложения. В интенте передается порт для отладчика, по которому среда будет взаимодействовать с дебаггером.
    Система, получив интент:
    Стартует приложение Приложение при старте получает порт и пытается поднять gdb сервис отладки на указанном порту. Соответственно, если порт уже занят, то вы получите эту ошибку. Он может быть занят в результате предыдущей отладки делфи приложения, которое не было завершено, что заставляет Андроид удерживать нужный среде порт. Помогает обычно:
    Полный ребут девайса, который гарантирует, что никакой ваш процесс у вас не повис. Удаление из процессов винды android_gdb. Который так же может удерживать нужный вам порт.
  24. Like
    Brovin Yaroslav получил реакцию от Ingalime в Tokyo 10.2 Не работает дебаг в Android   
    Физически, при старте приложения с дебагом, среда посылает на ваше устройство интент на запуск приложения. В интенте передается порт для отладчика, по которому среда будет взаимодействовать с дебаггером.
    Система, получив интент:
    Стартует приложение Приложение при старте получает порт и пытается поднять gdb сервис отладки на указанном порту. Соответственно, если порт уже занят, то вы получите эту ошибку. Он может быть занят в результате предыдущей отладки делфи приложения, которое не было завершено, что заставляет Андроид удерживать нужный среде порт. Помогает обычно:
    Полный ребут девайса, который гарантирует, что никакой ваш процесс у вас не повис. Удаление из процессов винды android_gdb. Который так же может удерживать нужный вам порт.
  25. Like
    Brovin Yaroslav отреагировална ENERGY в Tokyo 10.2 Не работает дебаг в Android   
    Рестарт Windows и Android? 
×
×
  • Создать...