Jump to content

Squall_FF8

Members
  • Content Count

    77
  • Joined

  • Last visited

Everything posted by Squall_FF8

  1. Squall_FF8

    TDBLookupComboBox without the field: DataSource

    Great, that is exactly what I needed, Thank you!! It works to set the selected item, but also to check what Item is selected.
  2. Squall_FF8

    Is there a way to Clear content of TDateTimePicker?

    Thank you very much! Great idea! It seems that the check plays the role of Enabled: On/OFF, so disabled (grayed text) is visually good enough hint for: no value. It is strange that VCL lacks that option. FMX has IsEmpty on its pickers. Usually FMX lacks things that VCL has 🙂 EDIT: Actually above works only, if the ShowCheckbox is True 😞
  3. Squall_FF8

    [Resolved] Window State and position saver

    Hi guys, I want to save/load the main window position, size, state so every time you reopen it, it looks the it was when you close it. So the snippet bellow. It works ,... almost. When I close the app with a maximized window, after relaunch it is maximized, If I click the button to make it Normal, it doesnt go where I left it previously before maximizing. Can you help me? What I'm missing? P.S. If it matters, I use Delphi 12.2, on Win 10. OnCreate: Left := ini.ReadInteger(cSection, 'Left', Left); Top := ini.ReadInteger(cSection, 'Top', Top); Width := ini.ReadInteger(cSection, 'Width', Width); Height := ini.ReadInteger(cSection, 'Height', Height); WindowState := tWindowState(ini.ReadInteger(cSection, 'State', ord(WindowState))); OnDestroy: ini.WriteInteger(cSection, 'State', ord(WindowState)); if WindowState = wsNormal then begin ini.WriteInteger(cSection, 'Left', Left); ini.WriteInteger(cSection, 'Top', Top); ini.WriteInteger(cSection, 'Width', Width); ini.WriteInteger(cSection, 'Height', Height); end;
  4. Hey guys, I would like to add couple of .png images in an ImageList using design time ImageListEditor. However after I click Add, I get black rectangle? Is this working in Delphi 12?
  5. Squall_FF8

    Is it possible to use translucent png in Image List?

    OK, lets do it. From suggested links I used: In order to test it, I used an Image on top of SpeedButton. Image works fine with png. SpedButton is used because it is not WinControl (and thus can be under the image). Also the image overlap the glyph (to prove semi-transparency). Results: The Image (left) works perfectly, but the ImageList (on the right)... kind-a works - its much darker then the original. Did I missed something?
  6. Squall_FF8

    Is it possible to use translucent png in Image List?

    Thank you for you answer! It is very strange to me, that Delphi doesnt support png. You can add ico, which is like png without compression. I hoped in latest version they will fix this, but alas, no (most likely never, no interest in it). BTW by "floating", are you referring to "PngComponents" accessible trough Getit?
  7. Squall_FF8

    [Resolved] Window State and position saver

    Thank you Anders Melander for the code. I like your idea to auto-center. I would like to try that when I scale to multi-monitor awareness !
  8. Squall_FF8

    [Resolved] Window State and position saver

    Woah, THANK YOU!!! It worked just by changing it! I was afraid its going to be something about DPI awareness (new in Delphi, staring with 12)
  9. Hey guys, I have a DBGrid with many columns. I have check dbRowSelect. When I resize any column, the view of the grid scrolls. How to prevent that? If I unselect dbRowSelect, - it works perfect, no scrolling. BTW If it matters, I'm using Delphi 12.2.
  10. Hi guys, I have a modal window above my main form. I want to do something when I click outside the modal window. How I can do that? I tried with MouseMove, but it returns <X,Y> as <-1,-1> when the cursor is outside the modal window. Unfortunately that is not enough because, the same values are returned when you try to do things like resize,.. so there is no guarantee that <-1,-1> is what we need. On top of that MouseUp/Down is not even triggered when you click outside.
  11. Squall_FF8

    How to capture a mouse click outside a modal window?

    That looks promising. I guess I will have to handle WM_APP+2/WM_APP+3. BTW what type is GlobData? P.S. Will this technics work on Andoid/iOS? Since this is FMX it will be nice to work on all platforms.
  12. Squall_FF8

    How to capture a mouse click outside a modal window?

    Good questions! I'm interested only to signal, that mouse was clicked outside the modal window. Most likely outside click will be inside the application (usually maximized), but even if it looses the focus I dont need to react.
  13. Squall_FF8

    What is the proper way?

    Hey guys, I have a TStingGrid showing data from TFDQuerry through LiveBinding. The application allows to show/hide columns, move them and change their width. I would like to save changes in '.ini' file, so when I open the application, I see the grid the way it was before close. What is the proper way to do that? It seem to me that Column property of the grid holds the values that I need (width, position, visible). However the auto-created LiveBinding also has Columns. And the LiveBinding has "higher priority" when visualizing the Grid. However, maybe a bug but, in runtime when I change the colums order (with a mouse) and hide then show a column - order of columns returns the way it was. I checked with breakpoints - the order in LiveBinding doesnt change (when moving a column with mouse).
  14. Hey Guys, I have a TGrid in my project. It works great, but I want to change the colors of row/columns lines? How I can do that in FMX for Delphi 12.2?
  15. Squall_FF8

    Changing Row/Column line colors of cells in TGrid

    Sorry,, by hooking I mean using OnDrawColunmnCell 🙂
  16. Squall_FF8

    Changing Row/Column line colors of cells in TGrid

    Thank you Serge_G! Correct me if I'm wrong, but looking in your code on Github and the French forum, I have to implement it by hooking OnDrawColunmnCell. If I want to manipulate: - the background color of cells:, FillRect - the border color of cells: FillStroke
  17. Squall_FF8

    How do I create an Android simulator under Delphi 11.3 ?

    How about using a good Android emulator, like Nox or Mumu? Lately I use Mumu to play games and works sometimes better then on real device (Razor Phone 2)
  18. Hey guys, I updated my Delphi to 12.2. Whenever I compile, build, ... the IDE saves any change in the source. How I can stop that? I'm used to save when I decide to. P.S. I was looking in Settings but cant find such option.
  19. Squall_FF8

    How to NOT save changes when compiling?

    Woah, thank you guys!!! Both answer with searching (text/AI) will be very helpful in future!
  20. Squall_FF8

    How to NOT save changes when compiling?

    Thank you VERY MUCH!!! I have skimmed trough these options 2-3 times, but somehow skipping this. Thanks again!
  21. Squall_FF8

    Access to the ListBox of tComboEdit

    Hey guys, I'm trying to implement: when the user presses ArrowDown key on tComboEdit, to open the ListBox and focus it (maybe even to select the first item). However unlike tComboBox, the LstBox is not exposed. How I can get a pointer to it?
  22. Squall_FF8

    Access to the ListBox of tComboEdit

    I found the answer: ListBox := TStyledComboEdit(ComboBox.Presentation).ListBox
  23. Squall_FF8

    Access to the ListBox of tComboEdit

    Any idea how to obtain a pointer to the dropped down LiestBox?
  24. Squall_FF8

    Access to the ListBox of tComboEdit

    Thank you for taking time to help me. I tried the code from your snippet. It works ... but not how I would like: - the listBox is not focused - you can't browse the list with the keyboard - by setting ItemIndex, you change the text (in the Edit part)
  25. Squall_FF8

    Access to the ListBox of tComboEdit

    That will do only the halve of the job - to show the ListBox,, but it will not focus it (also some other operations if I have a pointer)
×