bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed Aug 12, 2020 1:51 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: DC_XbpBrowse:itemRbDown
PostPosted: Fri Jun 05, 2020 7:37 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 12:59 am
Posts: 789
Location: Berlin, Germany
Hi, Roger.

If columns of a browse were deleted, DC_XbpBrowse:itemRbDown with Xbase++ 2.0 leads to a wrong column number. The deleted columns still count. This is a problem with RBSELECT.

Besides, DC_MsgBox() doesn't reflect the settings handed to DC_GetOptDefault(). Especially if a scalefactor is set, this leads to a lack of beauty. 8-)

_________________
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."


Top
 Profile  
 
PostPosted: Wed Jun 10, 2020 12:48 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
Tom -

I will look into this and get back to you.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Mon Jun 15, 2020 1:00 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
Quote:
DC_MsgBox() doesn't reflect the settings handed to DC_GetOptDefault(). Especially if a scalefactor is set, this leads to a lack of beauty.


Tom -

Try putting this somewhere at the beginning of your application:

DC_MsgBoxExpress(.f.)

The DCMSGBOX (DC_MsgBox()) command and function default to using the EXPRESS clause of DCREAD GUI. This insures that whatever DC_GetOptDefault() you have, that message boxes alway appear the same. This will be overridden by DC_MsgBoxExpress(.f.) and should give you your default look and the beauty you desire.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Tue Jun 16, 2020 12:49 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 12:59 am
Posts: 789
Location: Berlin, Germany
Thanks!

Do you need sample code for the browse behaviour thing?

_________________
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."


Top
 Profile  
 
PostPosted: Sun Jun 21, 2020 7:56 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
Quote:
Do you need sample code for the browse behaviour thing?


Yes, Please!!

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Mon Aug 03, 2020 7:45 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 12:59 am
Posts: 789
Location: Berlin, Germany
Here's the sample. The browse is build, column 3 is deleted before the dialog is shown. If you now right-click on a column from #3 on, the cursor will jump to the next column.

Code:
FUNCTION MAIN()
LOCAL GetList := {}, GetOptions := {}, oBrowse, aColumns := {}, aDir := Directory()

DCGET OPTIONS HIDE

aColumns := Array(Len(aDir[1]))

@ 1,1 DCBROWSE oBrowse DATA aDir SIZE 100,25 RBSELECT

FOR nCtr := 1 to Len(aDir[1])
  DCBROWSECOL ELEMENT nCtr HEADER Str(nCtr,2,0) WIDTH 10 PARENT oBrowse OBJECT aColumns[nCtr]
NEXT

DCREAD GUI ADDBUTTONS OPTIONS GetOptions TITLE 'Browse Test' FIT ;
       EVAL {|o|oBrowse:DelColumn(3),o:Show()}
RETURN NIL


Edit: This worked perfect with Xbase++ 1.9 SL1. The behaviour came with 2.0 and the change in _DCXBROW.PRG you added here:
Code:
METHOD DC_XbpBrowse:itemRbDown( aPos, aValues )

LOCAL nRow := aValues[2]
LOCAL nCol

IF ::rightButtonSelect

  #if XPPVER > 02000000
    nCol := aValues[1]:columnPos // <<<<<<<
  #else
    nCol := ::ColNum ( aValues[1] )
  #endif
  ::xbpBrowse:gotoItem( nRow, nCol )
  ::colPos := nCol
ENDIF

::XbpBrowse:itemRbDown( aPos, aValues )

RETURN self

_________________
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."


Top
 Profile  
 
PostPosted: Thu Aug 06, 2020 1:27 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 12:59 am
Posts: 789
Location: Berlin, Germany
Push. 8-)

_________________
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."


Top
 Profile  
 
PostPosted: Sat Aug 08, 2020 11:09 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
Sorry, I wasn't getting my mail notifications. Something has happened to the board's ability to talk to Gmail.

I am seeing no difference in behavior between 1.9 and 2.0.

Right clicking on any cell works fine for me.

I am using Xbase+ build 1176, eXpress ++ build 267.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
PostPosted: Sun Aug 09, 2020 2:46 am 
Offline
User avatar

Joined: Thu Jan 28, 2010 12:59 am
Posts: 789
Location: Berlin, Germany
Hi, Roger.

Did you check my sample? Right clicking behaves wrong if a column was deleted. It seems you established an iVar "ColumnPos" for columns in Xbase++ 2.0, which is used to set the cursor positiion. This number is wrong if a column was deleted. Maybe I have to set it manually.

_________________
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."


Top
 Profile  
 
PostPosted: Sun Aug 09, 2020 6:37 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4149
Location: Boise, Idaho USA
Yes, I DID compile and run your sample and I see no difference in behavior between 1.9 and 2.0.

I will look at the source code again to see if I can figure out why you are having the problem.
I use the International version of Xbase++ and you use the German version, but I don't see why that would make a difference.

Can you make a short video of the behavior so I can see what you are seeing?

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group