Marko Von Richards

Member since: Sunday, 23 October 2016
Last login:
Profile viewed: 1,077 views

No Rank
Points: 0

Marko Von Richards replied to the topic 'Error Sorting Database' in the forum. 1 week ago

This simplifies things a bit...

void __fastcall TForm2::DBGridDataTitleClick(TColumn *Column) {
	String sSort = "";
	// Are we changing the column on which we are sorting?
	if (DataModule3->FDQueryData->SQL->Text.Pos(Column->FieldName)) {
		// SAME column, so we simply change the sort order...
		if (DataModule3->FDQueryData->SQL->Text.Pos(" DESC") < 1))
			sSort = " DESC";
	DataModule3->FDQueryData->SQL->Text = "SELECT * FROM SSAttendance ORDER BY " + Column->FieldName + sSort;


Marko Von Richards replied to the topic 'DBGrid Paint a Row' in the forum. 2 weeks ago

Use the OnDrawColumnCell event of the grid


void __fastcall TfrmMain::mygridDrawColumnCell(TObject *Sender, const TRect &Rect,
		  int DataCol, TColumn *Column, TGridDrawState State)
	TDBGrid * pGrid = (TDBGrid *)Sender;
	if (State == TGridDrawState() << gdSelected << gdFocused) {
		pGrid->Canvas->Brush->Color = TColor(0x9d7544);
		pGrid->Canvas->Font->Color = clWhite;
	else {
               // Process accroding to your own colour requirements, mine works on the status of a particular
               // qty in the database but trigger you colour change how you want
		int nStatus = pGrid->DataSource->DataSet->FieldByName("qtyactuallyputaway")->AsInteger;
		if (nStatus < 10) {
			pGrid->Canvas->Brush->Color = grdColours[nStatus];
			pGrid->Canvas->Font->Color = clWindowText;
		else {
                       // Before we put down a colour check if we are using styles, you can probably skip this
			if (TStyleManager::ActiveStyle->Name != "Windows") {
				pGrid->Canvas->Brush->Color = TColor(0x383330);
				pGrid->Canvas->Font->Color = clWhite;
			else {
				pGrid->Canvas->Brush->Color = clWindow;
				pGrid->Canvas->Font->Color = clWindowText;
        // Now lets colour the grid row
	pGrid->DefaultDrawColumnCell(Rect, DataCol, Column, State);


Marko Von Richards replied to the topic 'Program works one day bu not the next?' in the forum. 2 weeks ago

Have you installed or removed any other programs on your PC or indeed added or removed any components in the RAD IDE?

If so these often change the PATH which sometimes causes issues if previous RAD studio or third party controls have been installed


Marko Von Richards posted a comment on Targeting iOS 12 with RAD Studio 4 weeks ago

Albert, I have read the Google Play announcement and it does not mention blocking currently available apps, it is only for new apps or updated apps, so you still have a month or two to get an update out. When you state "basically means in a 2 months

Marko Von Richards replied to the topic 'ListView is empty on Android' in the forum. 4 weeks ago

What version or delphi/c++ builder are you using?


Marko Von Richards replied to the topic 'Delphi Firedac SQLite Commit problem' in the forum. 1 month ago

Have you checked the SQLITE VACUUM documentation?


Have you Tried SetFocus() in the OnKeyDown field of your edit control?

if (Key == VK_RETURN)


Marko Von Richards created a new topic ' Is a basic Mac Mini useable to for Mac OSX development' in the forum. 2 months ago

I am wanting the cheapest physical option to enable me to compile mac osx and ios apps using C++ Builder 10.2.3
I have an iMac Pro at home, but want to use a cheap alternative when out and about and was wondering if the Mac Mini (cheapest current model) is able to do the job? I can't afford anything else.


When you say 'Whenever focus changes' are you meaning the active control gets focus and the virtualkeyboard pops-up?
If so, you could use non-edit controls, or set the controls to read-only, that way android knows they cannot use the keyboard at the focus event.


Marko Von Richards created a new topic ' Buying Delphi when owning C++ Builder...' in the forum. 3 months ago

I currently subscribe to the latest c++ builder Tokyo professional version. I would like to recompile some Delphi projects but of course, the Delphi personality isn't included. So I want to buy Delphi professional license to allow me to use it.
Everywhere I look it suggests that you can ONLY have RAD Studio if you want to install both Delhi and C++ Builder on the same pc, but as I already own C++ Builder subscription, is it possible to simply buy Delphi AND have it installed concurrently, or am I doomed to have to either manage without Delphi as I can't afford to buy RAD Studio as I own half of it already!


Marko Von Richards replied to the topic 'DBGRID doesn't show records' in the forum. 4 months ago

Have you tried refreshing the grids underlying datasource?


Marko Von Richards replied to the topic 'FireDac is... very slow!' in the forum. 4 months ago

Not sure I follow the logic of assigning a transaction to a select query, but have you tried it without setting Qry.Transaction and Qry.UpdateTransaction to see if it is any quicker?


Agree with Andy W, was looking forward to trying these with my new C++ Builder 10.2.3 but appears, even though it says in the intro paragraph, they are not available for c++ builder!