DCGET COMBO on Win 7

This forum is for eXpress++ general support.
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: DCGET COMBO on Win 7

#11 Post by Cliff Wiernik »

skiman wrote:
Cliff Wiernik wrote:Roger, I see this behavior on all my windows 7 dialogs. Everything appears to be shifted a few pixels to the right and cut off. I will get you a few sample of the WinXP vs Win7 look.

Cliff.
Hi Cliff,

I solved this problem with the following:

Code: Select all

DCGETOPTIONS ;
   FITPAD 25
DC_GetOptDefault(GetOptions)
I don't check on the Windows version. With the above value it is always correct.
I use FITPAD 5 versus FITPAD 10 since I started with Express++ to get more useable space on the screen. I will look at what affect FITPAD 25 has, but I bet it just masks the affect a bit as their is more space so it is not as noticeable.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: DCGET COMBO on Win 7

#12 Post by Koverhage »

Hi Cliff,

this is only for DCREAD FIT
Klaus

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: DCGET COMBO on Win 7

#13 Post by Cliff Wiernik »

That is what I use:

DCGETOPTIONS FITPAD 5

DCREAD GUI FIT

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCGET COMBO on Win 7

#14 Post by rdonnay »

I didn't dig into this sufficiently to realize what was going on here.

I thought that the Get Combo sample in Sample Group 2 was using the DCGET COMBO clause but I wrote that sample before adding DCGET COMBO to eXpress++. I DO get the same result on Windows 7 as you are all experiencing with DCGET COMBO and will have a solution for you soon.

Sorry about that.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: DCGET COMBO on Win 7

#15 Post by BruceN »

mucho thankso....
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCGET COMBO on Win 7

#16 Post by rdonnay »

Here is the fix:

Replace the function _GetComboData() in _DCXBPGT.PRG with the below code.
Then rebuild DCLIPX.DLL by running BUILD19_SL1.BAT.

Code: Select all

STATIC FUNCTION ;
  _GetComboData( c, bField, nHeight, xData, nPointer, bReturn, nWidth, ;
                 oGet, cFont, aPres, nKey)

LOCAL nLength, lOk, acbData, i, aPos, aWorkArea, aGetPos, bItemMarked

IF Valtype(c) = 'C'
  nLength := Len(c)
ELSE
  nLength := Len(oGet:editBuffer())
ENDIF

xData := oGet:comboData

IF Valtype(xData) = 'A'
  IF !Empty(xData) .AND. Valtype(xData[1]) # 'A'
    acbData := Array(Len(xData))
    FOR i := 1 TO Len(xData)
      acbData[i] := { xData[i] }
    NEXT
  ELSE
    acbData := xData
  ENDIF
ELSE
  acbData := xData
ENDIF

aGetPos := DC_CalcAbsolutePosition( {0,0}, oGet )
aPos := { aGetPos[1]+3, aGetPos[2]-nHeight+3 }

aWorkArea := DC_GetWorkArea()

IF aPos[2] < ( AppDeskTop():currentSize()[2] - aWorkArea[4] )
  aPos[2] := aGetPos[2] + oGet:currentSize()[2]
ENDIF

oGet:comboStatic:setPos(aPos)

oGet:comboStatic:show()
oGet:comboStatic:toFront()

IF DC_GetComboImmediate()
  bItemMarked := {|a,b,o,c|c:=_GetComboReturn(acbData,bField,bReturn,@nPointer,nLength,oGet)}
ENDIF

nPointer := 1

lOk := DC_FindBrowse( {{bField,'',nWidth,nil,nil}}, ;
                       oGet:comboStatic:drawingArea, 2, 2, ;
                       oGet:comboStatic:drawingArea:currentSize()[1]-2, ;
                       oGet:comboStatic:drawingArea:currentSize()[2]-2, ;
                       nil, .f., .f., .t., acbData, @nPointer,,aPres,,,,,cFont, ;
                       nil, nil, nil, nil, nil, bItemMarked,, nKey, oGet)

oGet:comboStatic:hide()

IF lOk
  c := _GetComboReturn(acbData,bField,bReturn,nPointer,nLength,IIF(!Empty(nKey),oGet,nil))
ENDIF

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

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: DCGET COMBO on Win 7

#17 Post by Koverhage »

Hi Roger,

the combo is okay now, but the problem exist also with the print preview window.
See Samples 1 / Preview

Klaus
Klaus

Dian
Posts: 21
Joined: Tue Feb 02, 2010 8:36 am
Location: Midland Texas

Re: DCGET COMBO on Win 7

#18 Post by Dian »

The same problem exists in a tree menu. The scroll bar is partially hidden when the expanded menu area is larger than the window. See the tree menu in xdemo for an example.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: DCGET COMBO on Win 7

#19 Post by BruceN »

looks like I started something.... a whole lot of dialogs are not 'win 7 optimized' it appears
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCGET COMBO on Win 7

#20 Post by rdonnay »

Here is a fix for the Print Preview window.
Make the below change in _DCPRC.PRG and rebuild DCLIPX.DLL by running BUILD19_SL1.BAT
This fix will be in build 256.

Code: Select all

WAS:
   ::oPreview := XbpPreview():new( drawingArea, , {0,0}, {nWidth,nHeight-20},,,, nUnits )

IS:
   ::oPreview := XbpPreview():new( drawingArea, , {0,0}, {drawingArea:currentSize()[1],nHeight-20},,,, nUnits )
The eXpress train is coming - and it has more cars.

Post Reply