tbsCheck ToolButton lazarus / 31-LCL ---------------------------------------------------------------------- anna · 2010-07-15 10:45 Lazarus Daily Snapshot: Lazarus-0.9.29-26562-fpc-2.4.0-20100710-win32.exe OS: WinXP SP3 ToolButton's Style property must be tbsCheck. ToolButton must have some image from some ImageList. Paternal ToolBar's Flat property must be True. Problem: When I push left mouse button on Toolbutton , its image goes little right & down. When I release left mouse button, Toolbutton becomes downed but Toolbutton's image restores position. But if Toolbutton is in downed mode its image must be little right & down. Cursor over ToolButton: http://img197.imageshack.us/img197/4206/29139781.png Cursor over ToolButton and left mouse button is pressed: http://img189.imageshack.us/img189/6066/83945603.png Left mouse button is released: http://img339.imageshack.us/img339/7584/53308528.png So why is ToolButton's image on screensot3 not in same position as on screensot2? ---------------------------------------------------------------------- anna · 2010-07-15 13:45 Downed SpeedButton with nonzero GroupIndex has correct moving of Gliph. Why do not ToolButton behaviour duplicate nonzero-GroupIndex- SpeedButton behaviour? Is it a bug? ---------------------------------------------------------------------- anna · 2010-07-19 13:32 In what unit is there code which drives Gliph movements? ---------------------------------------------------------------------- anna · 2010-07-19 18:27 I cannot find unit. Moderator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question: In what unit is there code which drives Gliph movements? You also cannot find unit, can you? ---------------------------------------------------------------------- anna · 2010-07-19 18:33 I see/ Lazarus is not open source!!! ---------------------------------------------------------------------- skalogryz · 2010-07-19 19:15 Quote from: anna on July 19, 2010, 08:27:01 pmModerator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question: In what unit is there code which drives Gliph movements? You also cannot find unit, can you? Actually, It's something similar to a hospital. The most critical bugs are get most attention of the developers. Of course, the difference is that "doctors" here are not payed for curing "patients", so sometimes "doctors" spend their time on what they actually interested in. Anyway, I'm looking at your problem right now. ---------------------------------------------------------------------- anna · 2010-07-19 19:27 Quote from: skalogryz on July 19, 2010, 09:15:55 pmQuote from: anna on July 19, 2010, 08:27:01 pmModerator, you said that Lazarus is opensource. Why are you silent? I'll repeat the question: In what unit is there code which drives Gliph movements? You also cannot find unit, can you? Actually, It's something similar to a hospital. The most critical bugs are get most attention of the developers. Of course, the difference is that "doctors" here are not payed for curing "patients", so sometimes "doctors" spend their time on what they actually interested in. Anyway, I'm looking at your problem right now. Just tell unit name. ---------------------------------------------------------------------- skalogryz · 2010-07-19 19:34 Quote from: anna on July 19, 2010, 08:27:01 pm Just tell unit name. the unit name is ComCtrls. But you're interested in toolbutton.inc file. The method TToolButton.Paint line 346 (latest SVN) Code: [Select]    if (ImgList<>nil) then     begin       if ThemeServices.IsPushed(Details) then       begin         inc(IconPos.X);         inc(IconPos.Y);       end;            ImgList.Draw(Canvas, IconPos.X, IconPos.Y, ImgIndex, Enabled);     end; ---------------------------------------------------------------------- skalogryz · 2010-07-19 19:44 you can try fixing the problem by using this check Code: [Select] if ThemeServices.IsPushed(Details) or Down then    ... ---------------------------------------------------------------------- skalogryz · 2010-07-19 20:04 fixed r26740. please test and close the issue if it's fine ---------------------------------------------------------------------- anna · 2010-07-20 00:35 Quote from: skalogryz on July 19, 2010, 09:44:27 pmyou can try fixing the problem by using this check Code: [Select] if ThemeServices.IsPushed(Details) or Down then    ... I have written this, but nothing's happened. After releasing left mouse button, Gliph still restores original position. What the stupid? I even tried to rebuild Lazarus, but unsuccessfully. So toolbutton.inc file unrelated to Lazarus. What purpose is toolbutton.inc for? How to modify Lazarus, eh? Where is r26740? I can see r26728 only! While r26740 is relegated to oblivion, tell me how get into shape current Lazarus. ---------------------------------------------------------------------- Troodon · 2010-07-20 01:56 Missie, the guy is trying to be helpful. How often does a bug get fixed so fast? Check this out: http://svn.freepascal.org/svn/lazarus/ ---------------------------------------------------------------------- skalogryz · 2010-07-20 03:38 Quote from: anna on July 20, 2010, 02:35:27 amI have written this, but nothing's happened. After releasing left mouse button, Gliph still restores original position. What the stupid? Did you rebuild LCL? You've modified the LCL unit. To see changes in action you need to rebuild LCL and then rebuild the application. Select from menu Tools -> Configure "Build Lazarus" -> Quick Build Options. select "Build LCL" at "Build options" and then press "Build" bottom. Quote from: anna on July 20, 2010, 02:35:27 amI even tried to rebuild Lazarus, but unsuccessfully. So toolbutton.inc file unrelated to Lazarus. What purpose is toolbutton.inc for? Why was it unsuccessfully? It feels like you've rebuilt Lazarus IDE only, without rebuilding LCL first. As for the purpose of toolbutton.inc, I'm sure you can find the answer just by looking at ComCtrls unit. Quote from: anna on July 20, 2010, 02:35:27 amWhere is r26740? I can see r26728 only! I guess you're looking at Daily Snapshots. 26740 is already available where: http://www.hu.freepascal.org/lazarus/ Though not for win64, of some reason. ---------------------------------------------------------------------- anna · 2010-07-20 05:32 Moderator, I love you.