Recent

Author Topic: [SOLVED] Horizontal TSpinEdit?  (Read 2729 times)

jamie

  • Hero Member
  • *****
  • Posts: 6964
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #15 on: January 21, 2023, 08:51:38 pm »
Wow, such a compromise. :(
The only true wisdom is knowing you know nothing

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #16 on: January 21, 2023, 08:57:19 pm »
Yes, it is too bad. I have tried arrows. Unfortunately they do not increment when holding them down like an updown does.

I just noted it in case the OP was hoping the solution was cross platform.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 15.3.2: Lazarus 3.8 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 3.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 3.8 (64 bit on VBox)

jamie

  • Hero Member
  • *****
  • Posts: 6964
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #17 on: January 21, 2023, 09:01:55 pm »
If you want such a look, you could create a TFrame with all the needed items within and then just include it later.
The only true wisdom is knowing you know nothing

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #18 on: January 21, 2023, 09:17:09 pm »
I have not tried TFrames, I will have a look. Thanks.

I try to stick with native controls if possible, and the TUpDown is not a huge issue for me. Just a heads up that a horiz one is not cross platform.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 15.3.2: Lazarus 3.8 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 3.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 3.8 (64 bit on VBox)

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #19 on: January 22, 2023, 01:40:00 pm »
Yes, it is too bad. I have tried arrows. Unfortunately they do not increment when holding them down like an updown does.

I just noted it in case the OP was hoping the solution was cross platform.

Hi!

Use OnMouseDown and OnMouseUp:

Increment the Edit in a loop until OnMouseUp.
The loop needs perhaps a little sleep between the incrementations.
And definitly an Application.ProcessMessages

Winni

del

  • Sr. Member
  • ****
  • Posts: 258
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #20 on: February 18, 2023, 01:56:27 am »
I jumped over to Windows for a while to play with that android subsystem, and I brought a bunch of my work over from the Linux side and FWIW it works on Windows 11 too.



Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: [SOLVED] Horizontal TSpinEdit?
« Reply #21 on: February 18, 2023, 02:46:08 am »
This can be do with TECSpinBtns or TECSpinEdit from EC-Controls. There is property GlyphStyle (or Buttons.GlyphStyle). Horizontal arrows are egsPlayer and egsComparison. Screenshot added but It's even more configurable.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018