Re: [Lazarus] how to find this error?
On 29.06.2015 13:57, zeljko wrote: On 06/29/2015 11:43 AM, FreeMan wrote: fpc r31177 lazarus r49465 qt x64 osx my project work in osx qt64, win32 i386 qt is workas well, but in win64 qt64 create access violation exception on myform.Show; on form has a TStatusBar I := TStatusBar.Canvas.TextWidth(TStatusBar.Panels[0].Text); this code has create exception in win64 too. when I wrote this message, http://forum.lazarus.freepascal.org/index.php/topic,27706.0.html same form and same my code worked, I mean my code not changed but not working now. I remark this line and re try run under win64, but still raise exception when use myForm.Show; I can not trace this exception, I added onShow event but not trigger. raise exception and terminate application. whats yours suggestion? TStatusBar bar has a bug ?? or what can be problem ? TStatusBar.Canvas.TextWidth() needs Canvas.Handle when you use it. Canvas.Handle isn't available until there's no paintevent on TQtWidget handle, so that may be problem. Try to use temporary bitmap for text measuring and see if it works. zeljko TPageControl except Error in win64 qt on show, no any error on create. TPageControl.Visible := False; I added this in form.oncreate event. This form now open without error, but no page control. pagecontrol has a TBCButton and thats have a just onclick event, they work like a menuitem for me. And usually my all forms is inherited from same main form. (I added lfm file's code). that create exception too. and just in win64. osx qtx64, win32 qt work normally. There is no except error. not test in linux yet. TPageControl.Visible := False; I added this code and form is showing. after then try close access voilation error except again. inherited FRM_Main: TFRM_Main Left = 412 Top = 137 Width = 1175 ActiveControl = PGC_Menu Caption = 'FRM_Main-' ClientWidth = 1175 OnCreate = FormCreate OnDestroy = FormDestroy OnShow = FormShow inherited STAT_Bar: TPanel Width = 1175 Caption = ' ' ClientWidth = 1175 inherited L_dbName: TBCLabel Width = 891 end end inherited PGC_Menu: TPageControl Width = 1082 ActivePage = TBS_GunlukIslemler TabIndex = 2 inherited TBS_System: TTabSheet ClientHeight = 120 ClientWidth = 1075 inherited BTN_Sys_Settings: TBCButton Height = 60 OnClick = BTN_Sys_SettingsClick end inherited BTN_Change_db: TBCButton Height = 60 end inherited BTN_Update_Prog: TBCButton Height = 60 OnClick = BTN_Update_ProgClick end inherited BTN_Backup_db: TBCButton Left = 491 Height = 60 OnClick = BTN_Backup_dbClick end inherited BTN_User_Perms: TBCButton Height = 60 OnClick = BTN_User_PermsClick end object BTN_join: TBCButton[5] Left = 392 Height = 62 Top = 0 Width = 99 Align = alLeft -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Disabled images
Hi All, I have a toolbar with buttons on it, that are linked to actions. I also note, that there is a property called DisabledImages. I'm presuming this is to do with images that will be displayed on the toolbar, instead of the normal images, when the action is disabled? If this is the case, how do I specify which image relates to the correct action in the ImageList? Hope that makes sense? Windows 7 Pro Lazarus 1.4 FPC 2.6.4 Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Disabled images
Your understanding that the disabled images will be used instead of the normal images if the action is disabled is correct. You may have noticed also there are also HotImages which become active if the mouse is moved over a toolbutton. BUT: Since there is only one ImageIndex all Imagelists (Images, DisabledImages, HotImages) must be in sync, i.e. same count and same order of images. This is some kind of restriction for practical use. Am 02.07.2015 um 14:00 schrieb Richard Mace: Hi All, I have a toolbar with buttons on it, that are linked to actions. I also note, that there is a property called DisabledImages. I'm presuming this is to do with images that will be displayed on the toolbar, instead of the normal images, when the action is disabled? If this is the case, how do I specify which image relates to the correct action in the ImageList? Hope that makes sense? Windows 7 Pro Lazarus 1.4 FPC 2.6.4 Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Disabled images
Great, thanks for the info. Richard On 2 Jul 2015 13:24, Werner Pamler werner.pam...@freenet.de wrote: Your understanding that the disabled images will be used instead of the normal images if the action is disabled is correct. You may have noticed also there are also HotImages which become active if the mouse is moved over a toolbutton. BUT: Since there is only one ImageIndex all Imagelists (Images, DisabledImages, HotImages) must be in sync, i.e. same count and same order of images. This is some kind of restriction for practical use. Am 02.07.2015 um 14:00 schrieb Richard Mace: Hi All, I have a toolbar with buttons on it, that are linked to actions. I also note, that there is a property called DisabledImages. I'm presuming this is to do with images that will be displayed on the toolbar, instead of the normal images, when the action is disabled? If this is the case, how do I specify which image relates to the correct action in the ImageList? Hope that makes sense? Windows 7 Pro Lazarus 1.4 FPC 2.6.4 Richard -- ___ Lazarus mailing listLazarus@lists.lazarus.freepascal.orghttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus