Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

spinedit on linux

15 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrea Mauri

dear all,
I encountered a different behavior between win and linux using tspinedit. (Lazarus 0.9.29 r25153M FPC 2.4.0 i386-linux-gtk 2 (beta)) two things:
1. the onchange event on windows is raised both if I click on the arrows or if I directly edit the spinedit value using the keyboard, on linux the onchange event is raised only if I click the spinedit arrows
2. on windows if I move the mouse over the spinedit arrows the cursor correctly become crArrow while on the edit is crIBeam, on Linux both on the edit box, both on the arrows the cursor is crIBeam Any hint?
Andrea

Reply by email

Paul Ishenin
to Andrea Mauri
Andrea Mauri wrote 7 lines
dear all, I encountered a different behavior between win and linux using tspinedit. (Lazarus 0.9.29 r25153M FPC 2.4.0 i386-linux-gtk 2 (beta)) two things: 1. the onchange event on windows is raised both if I click on the arrows or if I directly edit the spinedit value using the keyboard, on linux the onchange event is raised only if I click the spinedit arrows

This is a bug. Both widgetsets need to pass the same events

2. on windows if I move the mouse over the spinedit arrows the cursor correctly become crArrow while on the edit is crIBeam, on Linux both on the edit box, both on the arrows the cursor is crIBeam Any hint?

This is ok. Each system has some differences.

Best regards,
Paul Ishenin.

Reply by email

Andrea Mauri
to Paul Ishenin

Il 05/05/2010 15.24, Paul Ishenin ha scritto:

> 1. the onchange event on windows is raised both if I click on the > arrows or if I directly edit the spinedit value using the keyboard, on > linux the onchange event is raised only if I click the spinedit arrows This is a bug. Both widgetsets need to pass the same events

I will submit on mantis.
andrea

Reply by email

Andrea Mauri
to Paul Ishenin: This is a bug. Both widgetsets need to pass the same events This is ok. Each system has…

Il 05/05/2010 15.24, Paul Ishenin ha scritto:

Show quoted text 5 lines
> 2. on windows if I move the mouse over the spinedit arrows the cursor > correctly become crArrow while on the edit is crIBeam, on Linux both > on the edit box, both on the arrows the cursor is crIBeam > Any hint? This is ok. Each system has some differences.

Why is it ok? Ok that each system can have differences but for example the comboboxes in the object inspector of lazarus has (both on win and linux) the crArrow on the arrow and crIBeam on the edit of the combo. I think that tspinedit should have the same appearance/behaviour both on win and linux.
andrea

Reply by email

Paul Ishenin
to Andrea Mauri
Andrea Mauri wrote 5 lines
Why is it ok? Ok that each system can have differences but for example the comboboxes in the object inspector of lazarus has (both on win and linux) the crArrow on the arrow and crIBeam on the edit of the combo. I think that tspinedit should have the same appearance/behaviour both on win and linux.

Try to compare with any default gtk2 application. If there spinedit behave the same as in lazarus then it is ok - this is system behavior in other case this is a bug which needs to be fixed.

Best regards,
Paul Ishenin.

Reply by email

Andrea Mauri
to Paul Ishenin

Il 05/05/2010 16.10, Paul Ishenin ha scritto:

Try to compare with any default gtk2 application. If there spinedit behave the same as in lazarus then it is ok - this is system behavior in other case this is a bug which needs to be fixed.

I tried, actually I didn't find an application with spinedit, I will look deeper.
andrea

Reply by email

Andrea Mauri
to Andrea Mauri

Il 05/05/2010 16.13, Andrea Mauri ha scritto:

I tried, actually I didn't find an application with spinedit, I will look deeper.

ok, found. the character map application has a spinedit. I tested it and the cursor is crIBeam on the editbox and crArrow on the arrows of the spinedit.
Now I noticed that an analogous behaviour can be observed with TCombobox, on windows you can see both cursor (arrow and IBeam) while on Linux only arrow (default behaviour on gtk2 is the same as tspinedit (IBeam and arrow)).
So on linux:
TSpinedit only IBeam cursor must be IBeam and arrow TCombobox only arrow cursor must be IBeam and arrow andrea

Reply by email

Graeme Geldenhuys
to Paul Ishenin: This is a bug. Both widgetsets need to pass the same events This is ok. Each system has…
Paul Ishenin wrote 6 lines
> 2. on windows if I move the mouse over the spinedit arrows the cursor > correctly become crArrow while on the edit is crIBeam, on Linux both on the > edit box, both on the arrows the cursor is crIBeam > Any hint? This is ok. Each system has some differences.

This does not happen for me. Using r25169 and IDE compiled with GTK2. It works for me like he described it does under Windows.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Andrea Mauri: Il 05/05/2010 16.10, Paul Ishenin ha scritto: I tried, actually I didn't find an…
Andrea Mauri wrote 6 lines
> Try to compare with any default gtk2 application. If there spinedit > behave the same as in lazarus then it is ok - this is system behavior in > other case this is a bug which needs to be fixed. I tried, actually I didn't find an application with spinedit, I will look deeper.

GEdit, then click the menu: Edit > Preferences. The "right margin" setting uses a spinedit.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Andrea Mauri: Il 05/05/2010 15.24, Paul Ishenin ha scritto: Why is it ok? Ok that each system can have…
Andrea Mauri wrote
I think that tspinedit should have the same appearance/behaviour both on win and linux.

Then you should drop LCL and start using fpGUI Toolkit (see my signature). LCL's design goals are to use native widgets, so the look and behaviour is different on each platform. fpGUI does what you describe (look and feel is consistent on all platforms).

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email

Silvio Clecio
to Andrea Mauri
Andrea Mauri wrote
I tested it again (lazarus last svn fpc 2.4.0 on ubuntu 10.04), on TSpinedit I have always IBeam cursor, on win I have IBeam on Edit and arrow on arrows..

In my[*] this also with this same error. :(
I tested with SpinEdit of BitTorrent Client, GIMP, Gwget and Rhythmbox.

[*] FPC-2.4.0/Laz-0.9.29 rv25199/Ubuntu-9.10/GTK2

Silvio Cl?cio - <http://silvioprog.com.br>

Reply by email

zeljko
to Graeme Geldenhuys: This does not happen for me. Using r25169 and IDE compiled with GTK2. It works for me…
Graeme Geldenhuys wrote 10 lines
On 5 May 2010 15:24, Paul Ishenin wrote: >> 2. on windows if I move the mouse over the spinedit arrows the cursor >> correctly become crArrow while on the edit is crIBeam, on Linux both on >> the edit box, both on the arrows the cursor is crIBeam >> Any hint? > > This is ok. Each system has some differences. This does not happen for me. Using r25169 and IDE compiled with GTK2. It works for me like he described it does under Windows.

That bug is fixed 5 minutes ago ;)

Reply by email

zeljko
to zeljko
zeljko wrote 13 lines
On Wednesday 05 May 2010 16:40, Graeme Geldenhuys wrote: > On 5 May 2010 15:24, Paul Ishenin wrote: > >> 2. on windows if I move the mouse over the spinedit arrows the cursor > >> correctly become crArrow while on the edit is crIBeam, on Linux both > >> on the edit box, both on the arrows the cursor is crIBeam > >> Any hint? > > > > This is ok. Each system has some differences. > > This does not happen for me. Using r25169 and IDE compiled with GTK2. > It works for me like he described it does under Windows. That bug is fixed 5 minutes ago ;)

Sorry, fixed OnChange() only , not cursor look problems.

Reply by email

Hans-Peter Diettrich
to Andrea Mauri: Il 05/05/2010 16.13, Andrea Mauri ha scritto: ok, found. the character map application…
Show quoted text 7 lines
ok, found. the character map application has a spinedit. I tested it and the cursor is crIBeam on the editbox and crArrow on the arrows of the spinedit. Now I noticed that an analogous behaviour can be observed with TCombobox, on windows you can see both cursor (arrow and IBeam) while on Linux only arrow (default behaviour on gtk2 is the same as tspinedit (IBeam and arrow)).

These are basic composite components, consisting of multiple controls - at least on Windows. Each of these controls has its own cursor shape, that should be used in the GUI. Other widgetsets may have different implementations, with different cursor assignment and handling.

It's questionable whether such composite controls should have a Cursor property at all, and if so, it must be defined to which of the embedded controls the Cursor override should apply.

DoDi

Reply by email