[Gambas-user] Problems on UserControl properties

Charlie Reinl Karl.Reinl at ...2345...
Sat Sep 14 21:22:30 CEST 2013


Am Freitag, den 13.09.2013, 22:25 +0200 schrieb Karl Reinl:
> Salut Benoît,
> 
> I'm making a Timepicker for me, but I ran into problems.
> 
> I need 2 Class _Properties, first for 12/24 hours and second for minute
> slices, both raise in the control property grid, but only the second
> raise during form load, is it a bug  or what do I wrong?
> 
> By that way, one can not declare something like 
> 	Public Const 12_h As Integer = 12
> 
> I attached the project.

Salut,

I found out, the property_write event only raise, when the property took
a value <> Default.
If the property has its default value, property_write don't raise at
form load. 
So if you drop the control on your form and see that the values are
right (you have nothing to change), you will find you variable not
filled.

Now I fill the variables with their default value at declaration time.

Is that wanted by design like that ?

-- 
Amicalement
Charlie





More information about the User mailing list