You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

A1880

Intermediate

  • "A1880" is male
  • "A1880" started this thread

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

1

Friday, January 28th 2011, 11:54am

No blinking cursor in textbox

My Jabaco applications suffer from a minor problem in TextBox controls.
When I set the mouse cursor into the TextBox area, no blinking cursor is shown.
It is not visible to the user that the TextBox actually has the focus and is waiting for user entries.

Any idea how to circumvent that?

Greetings

A1880

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

2

Friday, January 28th 2011, 3:16pm

No blinking cursor in textbox - it's been there!

Hey there A1880,

I can confirm that for the updated Frameworks.
Anyway using the original Framework that came with the Jabaco Installation it is blinking!
Something must have changed there.

Have a nice day...


Dani

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

3

Friday, January 28th 2011, 8:45pm

Look at this:
http://code.google.com/p/jabacoframework…tBox.jsrc&old=9

There OlimilO have added tne line

Jabaco Source

1
Parent.setCaretColor(RGBtoColor(NotRGB(v)))
which makes this problem.
I know what he wanted with it. A cursor with negative colors. So that you see on a black background still a cursor/carret with white color.
But it don't work correct and makes this problem.

Don't know, which would be the best solution to fix it. I see three possibilities:
1. Outcomment this line.
2. Writing instead

Jabaco Source

1
Parent.setCaretColor(Parent.getForeground())
Then the carret have everytime the color of the foreground. Don't know if it already do it, if I would outcommenting it.
3. Trying to create a negative color. So that the foreground color is not important. Only the backgroundcolor.Currently I would have this solution for this:

Jabaco Source

1
Parent.setCaretColor(RGB (Parent.getBackground.getBlue XOR 255, Parent.getBackground.getGreen XOR 255, Parent.getBackground.getRed XOR 255))


But don't know, which of the three possibilities would be the better one. How works VB6?

This post has been edited 2 times, last edit by "theuserbl" (Jan 28th 2011, 8:56pm)


  • "schnitzelbrain" is male

Posts: 19

Date of registration: Jan 23rd 2011

Location: Germany

  • Send private message

4

Sunday, January 30th 2011, 5:44pm


Quoted

Public Property Let BackColor(v As Long)

Parent.setBackground(RGBtoColor(v))

Base.setBackground(Parent.getBackground())

Parent.setCaretColor(RGBtoColor(NotRGB(v)))

End Property


The line is in the BackColor Property. I have the same issue in my program but if I set the BackColor of the textfield while the program runs, the caret is perfekt afterwards.

I dunno if changing the lines as suggested will solve the problem as it uses the same information at the same point as the not working one.

The same is when i change the backcolor in the IDE.

During run the color remains white, i have to modify the color while the program runs.

Maybe the Init of the textbox has a problem, it looks the textbox is built but not komplet set correct.



I am not a big programmer just my 5c, maybe it helps.

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

5

Sunday, January 30th 2011, 10:24pm

Quoted

The line is in the BackColor Property. I have the same issue in my program but if I set the BackColor of the textfield while the program runs, the caret is perfekt afterwards.
O.O You are right. Thanks for that info.

The BackColor Property is right implemented, so I have looked at the NotRGB implementation.
But NotRGB is right implemented, too:
http://code.google.com/p/jabacoframework…c=svn81&r=81#94
And NotRGB works in Java-programs perfet.

And now you they, that it works during running ok, whats true.


Quoted

I dunno if changing the lines as suggested will solve the problem as it uses the same information at the same point as the not working one.
Right.

Quoted

The same is when i change the backcolor in the IDE.
Ok. Thanks. That clarify all.
When you see after starting the IDE the BackColor white as 255;255;255 , then it is not really that color.
At first, there don't exists a special color. The color after starting the IDE is at first "Selection.Backcolor".
And "Selection.Backcolor" can be on different systems different. It is a system-color.
If you choose "Selection.Backcolor" it gives to RGBtoColor the color number -2147483635 which is as hex 8000000D. RGBtoColor looks for this system color number and give calls the right Java system color:
http://code.google.com/p/jabacoframework…rmation.java#30

But in
Parent.setCaretColor(RGBtoColor(NotRGB(v)))
NotRGB is called before RGBtoColor, because RGBtoColor return a color not a long integer.
So a hex 8000000D is after the NotRGB a hex 80FFFFF2. 80 is the alfha chanal. So the normal color is FFFFF2 => Red 255, Green 255, Blue 242.
Hmm.. a color which is not white and you can still differ from white. Possible the alpha chanel 80 gives the rest, so that you can not see the carret.

Have more to look at it a
MsgBox( RGBtoColor(-2147483635) )
gives out a ""java.awt.SystemColor[i=14]"
and a
MsgBox( RGBtoColor(255) )
gives out "java.awt.Color[r=255, g=0, b=0]"


Quoted

During run the color remains white, i have to modify the color while the program runs.
Ok. Right.

Quoted

Maybe the Init of the textbox has a problem, it looks the textbox is built but not komplet set correct.
I think there problem have more to do with handling of system colors.


Quoted

I am not a big programmer just my 5c, maybe it helps.
Yes, it helps much to find the bug. Thanks.

  • "schnitzelbrain" is male

Posts: 19

Date of registration: Jan 23rd 2011

Location: Germany

  • Send private message

6

Monday, January 31st 2011, 10:30am

Nice that my thoughts helped you.
As an interim solution I use the following code, it sets each used Text field to the defined color white.
(Also @A1880)

Source code

1
2
3
4
5
6
Public Sub Applet_Init()
Dim wt As Long = RGB(255, 255, 255)
Text1.BackColor = wt
Text2.BackColor = wt
Text3.BackColor = wt
End Sub


After this, caret works perfekt.

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

7

Saturday, September 10th 2011, 5:11pm

No blinking cursor ... and some other!

Did anyone come up with a fix to this yet?

Also:

1. when I set a mouse listener for example tp a Jbgrid I can't get Me.mousepointer = vbHoureglass / vbDefault to work
--> does anyone know when setting a mouse listener to the JbGrid header, how to change the mousecursor?

2. at runtime when I set a Textbox (or other control) to FontBold nothing happens!


Thanks ...

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

8

Sunday, September 11th 2011, 2:25am

RE: No blinking cursor ... and some other!

Did anyone come up with a fix to this yet?


Thx for the reminder. Will be updated the next time.


Quoted

1. when I set a mouse listener for example tp a Jbgrid I can't get Me.mousepointer = vbHoureglass / vbDefault to work
--> does anyone know when setting a mouse listener to the JbGrid header, how to change the mousecursor?


Currently not tested. I will look at it the next times.


Quoted

2. at runtime when I set a Textbox (or other control) to FontBold nothing happens!


I have tried it out and it works perfect.

Jabaco Source

1
2
3
Public Sub Command1_Click()
    Text1.FontBold = True
End Sub

works fine on my computer.

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

9

Sunday, September 11th 2011, 7:28am

Quoted

I have tried it out and it works perfect.


Thanks for testing. I guess I have to fiddle with this one. I think Jabaco does not like my 'milk theme' on XP SP3!!

Dani

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

10

Sunday, September 11th 2011, 8:30am

OK, here is the scenario for my .FontBold Problem. It has nothing to do with a XP theme.

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
' in a module
Global prgRef As tPrgRef
'ProgRef Referenz Array...about 20 values!
Type tPrgRef
   tmpBool1 As Boolean = False
End Type

' in a frm
Public Sub cmdChangeSettings_Click()
   cmdChangeSettings.FontBold = True 
   Dim dlgChangeSettings1 As New dlgChangeSettings
   dlgChangeSettings1.Show(1)
   prgRef.tmpBool1 = False
   If prgRef.tmpBool1 = False Then cmdChangeSettings.FontBold = False 
   cmdChangeSettings.FontBold = False 
   'grdMain_init
End Sub


In either case cmdChangeSettings.FontBold = False will not happen and prgRef.tmpBool1 = False seems not to be addressed!
When I define Dim tmpBool1 as Boolen locally in the Sub it works for the variable.
cmdChangeSettings.FontBold = False stays Bold

Any thoughts on this one?

Dani

theuserbl

Intermediate

Posts: 436

Date of registration: Dec 20th 2008

  • Send private message

11

Sunday, September 11th 2011, 3:56pm

RE: No blinking cursor ... and some other!

New Version of the files:
[ Jabaco-rev84.jar ]
[ FrameworkTest-rev84.jar ]
[ FrameworkTest-rev84-OnTheFly.zip ]
[ jabacoframework-src-rev84.zip ]

Normally you need only Jabaco-rev84.jar. Rename it to Jabaco.jar and copy it in your Jabaco-directory.

Did anyone come up with a fix to this yet?
Yes. Done.

Quoted

2. at runtime when I set a Textbox (or other control) to FontBold nothing happens!
Fixed.

Quoted

1. when I set a mouse listener for example tp a Jbgrid I can't get Me.mousepointer = vbHoureglass / vbDefault to work
--> does anyone know when setting a mouse listener to the JbGrid header, how to change the mousecursor?
Currently still not looked at it.

Greatings
theuserbl

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

12

Sunday, September 11th 2011, 9:26pm

NICE ... :thumbsup:

THANK YOU VERY MUCH theuserbl

great to see that people stick around, very much appreciate it ...

Dani

Intermediate

Posts: 325

Date of registration: Nov 19th 2009

Location: GERMANY

  • Send private message

13

Wednesday, September 14th 2011, 1:02am

Hey everybody,
here is some more about Fonts:

Jabaco Source

1
2
3
4
5
' JBGrid
Public Sub Form_Load()
   grdTest.TextMatrix(0, 0) = "Test"
   grdTest.DataMatrix(0, 0).FontBold = True 
End Sub

.FontBold does not change!!

In the JBGrid it is possible to set every cell to a different FontColor

Jabaco Source

1
grdTest.DataMatrix(0, 0).CellForeColor = vbred


But when a cell is selected the FontColor turns to a Default ForeColor. Is there any way to prevent that?
So it would stay red and only the BackColor changes!


Dani

swissmade

Beginner

  • "swissmade" is male

Posts: 46

Date of registration: Aug 4th 2011

Location: The Netherlands

Occupation: Old Fasion Programmer

Hobbies: Play Music with my Bass

  • Send private message

14

Wednesday, September 14th 2011, 1:08am

Is working great.

Thanks theuserbl:thumbup:

Rate this thread
WoltLab Burning Board