

Chris1701
Members-
Content Count
31 -
Joined
-
Last visited
Community Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Sorry, it took some Googling but I worked out how to fix the Popup menu width problem but I got it. Thanks
-
Now while your suggestion works fine and sets the font size there is a problem where the width of the popup menu is too small and some lines run longer than the width of the popup menu and the text of some lines is getting cut off. Is there a way to make the width of the popup menu wider so that the complete text is visible?
-
That worked like a charm, thanks again!
-
When I asked this question the first time 5 or 6 years ago I got a few responses but that wasn't one of them. I'll test that and get back to you. Thanks Remy!
-
I have an application that has two versions both VCL, one for the desktop and one written specifically for a Windows Tablet to be used with the touchscreen. Back when I was first working on the tablet version I was looking for a way to change the text size of Popup menus, mainly because on the tablet when using touch the default text size for popup menus is way to small to be able to select an item by touch people with the group where I was asking the question said "Here, use Alpha Skins because these components let you do that" so I did buy it and it's had been working fine. However no one has heard from the developer in two years and it's been mentioned he is the Ukraine and people in the forums are speculating that he's possibly been killed and that there will not be updates that are needed to get the software to work on Delphi 13. So what are other options, possibly for components that are Delphi 13 compatible that would allow you to set the font size in a popup menu?
-
I have tons of programs with forms that have an OnShow procedure that the forms OnShow event calls and I've never had an issue; and even if that is true that doesn't explain why can't I set the dialogs forms OnShow property to nil to do nothing or set it to an alternate compatible procedure to do something different?
-
Ok that's an alternate way to do it but still doesn't explain why can't I set the dialogs OnShow property to nil to do nothing or set it to an alternate compatible procedure to do something different?
-
I'm using Delphi 12.2. Patch 2 and I'm trying to accomplish something that I've never had to do and I'm having a problem figuring it out. I have a dialog that is created and then called and freed by a particular form; this dialog is written with a default OnShow event. Now I've discovered that I want to reuse that dialog in another place however the OnShow event is not correct for that 2nd usage and before I use .ShowModal I want to either blank the OnShow event or reassign it to a different event that has the correct code for the 2nd usage and so far the things I've tried have failed: First thing, I know for something like a TButton you can set the OnClick event to Nil i.e. Button.OnClick := Nil; but MyDialogForm.OnShow := Nil; after the form is created "MyDialogForm := TMyDialogForm.Create(Application);" shows an error of E2025 Not enough actual parameters; likewise if I create an alternate OnShow procedure "procedure TMyDialogForm.OnShowNoProc(Sender: TObject);" and then after the dialog is created but before it's called I try MyDialogForm.OnShow := MyDialogForm.OnShow := MyDialogForm.OnShowNoProc;; I end up with the same error message Not enough actual parameters. What what am I doing wrong here, how can I either set the forms OnShow to Nil (do nothing) or reassign the OnShow event to an alternate procedure?
-
TStringgrid how to automatically set the column widths
Chris1701 replied to Chris1701's topic in VCL
Thanks Remy, I found this code on an old StackOverflow thread so I didn't write it and was just trying to make it work. The change you suggested worked like a charm, thanks so much! Merry Christmas! -
I have a form with a TStringgrid that I'd like to be able to programmatically set the column widths based on the text lengths in the grid itself. I used Google to search and didn't find a whole lot but I did find someone who provided this: Procedure TEditSeriesForm.SetColumnFullWidth( Var Grid: TStringGrid; ACol: Integer); var I, Str_Width, Col_Width: Integer; begin { set the width of the defined column in a string grid to the width of the widest string } Str_Width:=0; Col_Width:=0; For i := 0 To Grid.RowCount - 1 do begin // get the pixel width of the complete string Col_Width := EditSeriesForm.Canvas.TextWidth(Grid.Cells[Acol,i]); // if its greater, then put it in str_width If col_width>str_width then str_width:=col_width; end; Grid.ColWidths[Acol] := col_width+5; // +5 for margins. adjust if neccesary End; The problem is that this line of code "Col_Width := EditSeriesForm.Canvas.TextWidth(Grid.Cells[Acol,i]);" generates an exception class $C0000005 with message 'C0000005 ACCESS_VIOLATION" so I have no idea why this doesn't work so does anyone know offhand what's wrong with this or have an alternate method for checking and setting the string grid column widths based on the length of the text values in each column?
-
Sorry, I just gave up on this because no matter what I couldn't get it to work. I switched to Firebird V4 Embedded which seems to work fine. Thanks for trying to help.
-
After I posted I did look at that and it does say MS Access database 64bit, I don't see any option to test a connection string?
-
I'm in the process of rewriting a program that uses a simple Microsoft Access database which I access using TADOConnection the original program was like Delphi XE and 32bit and I'm now using Delphi 12 64bit. The problem that I'm having is that in the IDE if I check off the "Connected" it connects without an error but during runtime I get "EOleException with message Provider cannot be found. It may not be properly installed." Just an fyi I'm running Windows 11 Pro and I have Microsoft Office Pro 2019 x64 installed. The old version of this program still works without an error so I think it's pretty obvious that this is a problem with compiling to 64bit so I checked and downloaded and installed the Microsoft accessdatabaseengine_X64 installer but I'm still getting this error, so what do I need to do in order to resolve this problem? Thanks!
-
Delphi 12 Application showing two windows on the taskbar?
Chris1701 replied to Chris1701's topic in VCL
The dpr file other than the usual uses is: begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TdmData, dmData); Application.CreateForm(TMainForm, MainForm); Application.Run; end. So no, I'm not setting Application.MainformOnTaskbar to false and I'm not doing anything to override the CreateParams method or CreateWnd. -
Delphi 12 Application showing two windows on the taskbar?
Chris1701 replied to Chris1701's topic in VCL
I'll see what I can do but this is the only project that I've migrated to Delphi 12 that has this problem, none of my other projects have this issue and I'm not sure why.